C Codes
Beginners
C on Unix
Code Snippets
Data Structures
File Operations
Games Graphics
Gnu-Linux
Hardware
Mathematics
Miscellaneous
Small Programs
Sorting
C > Code Snippets sample source codes
Display whether a number is odd or even
Display whether a number is odd or even #include
int main() { int number ; printf("Enter a whole number\n"); scanf("%d",&number); if(number % 2 == 0) printf("Your number is even.\n"); else printf("Your number is odd.\n"); return 0; }
Privacy Policy
|
Link to Us
|
Links