Program number# 4
Program which determine even or odd number
Program:
void main (void)
int num, mod;
prnitf(“enter a number”);
scanf(“%d”, &num);
mod=num%2;
if(mod ==0 )
printf(“the entered number is even ”);
else if(mod==1)
printf(“the entered number is odd”);
else
printf(“the entered is invalid”);
}
0 comments:
Post a Comment
Please do not enter any spam link in the comment box