This program is a very simple example of " if statement in c" Hope you try to understand the code.
Code:
__________________________________________________________
#include(stdio.h)
#include(conio.h)
main()
{
int number;
printf("Enter the number to be checked");
scanf("%d",&a);
if(a%2==0)
{
printf("\t\nThe number you provided is a Even number\n\t");
}
else
{
printf("The number you provided is a Odd number");
}
getch();
}
__________________________________________________________
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment