wap a program in c to check weather the number is odd or even
Answers
Answered by
0
Hi friend,
#include <stdio.h> int main() { int n; printf("Enter an integer\n"); scanf("%d", &n); if (n & 1 == 1) printf("Odd\n"); else printf("Even\n"); return 0; }
Hope it helped you out........................
#include <stdio.h> int main() { int n; printf("Enter an integer\n"); scanf("%d", &n); if (n & 1 == 1) printf("Odd\n"); else printf("Even\n"); return 0; }
Hope it helped you out........................
Anonymous:
what about #include<conio.h>
Answered by
1
create an array function(read A[i])
{if (A[i]%2=='0')
cout<<even;
else cout<<odd;}
{if (A[i]%2=='0')
cout<<even;
else cout<<odd;}
Similar questions