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
English,
5 months ago
Science,
5 months ago
Math,
10 months ago
Environmental Sciences,
10 months ago
Computer Science,
1 year ago
Chemistry,
1 year ago
Math,
1 year ago