14. Write a program to check whether all digits of the given number are same type or not (i.e. all are
odd, all even numbers or both present)
Answers
Answered by
1
Explanation:
x = int(input('enter number '))
if x%2 == 0:
print('even')
else:
print('odd')
thank you...
hope it helps :)
Answered by
2
Answer:
#include[stdio.h]
#include[conio.h]
void main()
{
int x;
printf("Enter a Number");
scanf("%d", &x);
if(x%2=0)
{
printf("Entered no. is even);
}
else
{
printf("Entered no. is odd);
}
getch();
}
Similar questions
Chemistry,
4 months ago
Science,
4 months ago
Math,
4 months ago
Math,
8 months ago
Environmental Sciences,
8 months ago
Computer Science,
11 months ago
Chemistry,
11 months ago
Math,
11 months ago