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;
}
OMG i got stucked because i forgot "\n" haha thanks a lot Mr. Islam!
ReplyDeletea practicing muslim+programmer=a better human being...mat Allah rewaed u...best of luck...
ReplyDeletea practicing muslim+programmer=a better human being...may Allah rewrd u...jazakallah.....best of luck...
Delete