+ 2
Write a program to input any number and check the number is even or odd
2 Antworten
+ 2
Heres an example,but you should try it out first or upload your attempt...
int x;
printf("Enter a number\n");
scanf("%d",&x);
if (x%2==0)
printf("Its an even number");
else if(x%2==1)
printf("its an odd number");
+ 4
Did you tried it yourself before asking it over here?
If you did then do share your code and people can help wherever you'd be wrong.
And if you didn't then c'mon give it a try before asking it out coz you're here to learn something and so you must give your effort.