Saturday 6 February 2016

Solution of URI 1065 :: Even Between five Numbers


Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.

/**Bismillahir Rahmanir Rahim.**/

#include <stdio.h>

int main()
{
    int a,X,c=0;
    for(a=1;a<=5;a++)
    {
        scanf("%d", &X);
        if(X%2==0) c+=1;
    }
    printf("%d valores pares\n",c);
    return 0;
}

3 comments:

  1. OMG i got stucked because i forgot "\n" haha thanks a lot Mr. Islam!

    ReplyDelete
  2. a practicing muslim+programmer=a better human being...mat Allah rewaed u...best of luck...

    ReplyDelete
    Replies
    1. a practicing muslim+programmer=a better human being...may Allah rewrd u...jazakallah.....best of luck...

      Delete

Note: only a member of this blog may post a comment.