Computer Science, asked by Thecricketer, 1 year ago

write a program to take a number as input then check whether it is an odd number or not

Answers

Answered by atd01
1
C++

#include <iostream>
using namespace std;

int main() {
int n;
cin>>n;
if(n%2==0)
cout<<"not odd";
else
cout<<"odd";
return 0;
}
Answered by h4hero2004p4r7sq
0
C


#include <stdio.h>
void main()
{
int n;
scanf("%d", &n);
if (n % 2 != 0)
printf("/n%d is odd", n);
else
printf("/n%d is even", n);
}
Similar questions