C Program to check whether an integer entered by the user is odd or even
HP 15 Core i3 7th gen Laptop(4GB, 1TB HDD, Windows 10) |
C Program to check whether an integer entered number by the user is odd or even. I have used DEV-C++ compiler for debugging purpose. But you can use any C programming language compiler as per your availability.
#include <stdio.h>int main()
printf("Enter a number: ");
// True if remainder is 0if( number%2 == 0 )
printf("%d is an even number.",number);
printf("%d is an odd number.",number);
Tech Study passionately delivers stylish and innovative information to programmer and technology lovers. Tech Study is a young and innovative mind having the zeal to do something useful and creative. Our main goal is to offer step by step debugging solutions for programmers.