Computer Science, asked by Anonymous, 1 year ago

wap a program in c to check weather the number is odd or even

Answers

Answered by Nikki57
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........................

Anonymous: what about #include<conio.h>
Nikki57: i have written those
Anonymous: where...and what's int main() { int n;
Amy4774686: you don't need to write conio.h
Anonymous: okk..thanks
Answered by Amy4774686
1
create an array function(read A[i])

{if (A[i]%2=='0')
cout<<even;
else cout<<odd;}

Amy4774686: I can send you entire written code fragment , hope it helps reply if you want it
Anonymous: okkk..send it
Similar questions