C Program to print whether a number is even or odd
#include<stdio.h>intmain(void){intnum;printf("Enter a number : ");scanf("%d",&num);if(num%2==0)/*testforeven*/printf("Number is even\n");else{printf("Number is odd\n");num*=2;printf("Now the number is %d\n",num);}return0;}
No comments:
Write comments