/*Write a c program to check whether the given number is odd or even */ #include <stdio.h> #include <stdlib.h> int main() { int n ; printf("Enter number:\n"); scanf("%d",&n); (n%2==0)? printf("%d is even number.\n", n): printf("%d is odd number.",n); return 0; }
Enter number: 22 22 is even number.
No comments:
Post a Comment