Friday, October 26, 2018

Uri 1065 solution in C | Even Between five Numbers

/*Before seeing the code solution make sure that you have tried enough. Don’t copy- paste the whole code. Find out the logic. If you face any trouble, just inform me in comment.*/

#include<stdio.h>
main()
{
    int n,c=0,i;
    for(i=0;i<5;i++)
    {
        scanf("%d",&n);
        if(n%2==0)
        {
            c++;
        }
    }
    printf("%d valores pares\n",c);
    return 0;
}

 //Happy_Coding

No comments:

Post a Comment