Computer Science, asked by snigdha1712chandra, 10 months ago

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 nikhilnegi1230
1

Explanation:

x = int(input('enter number '))

if x%2 == 0:

print('even')

else:

print('odd')

thank you...

hope it helps :)

Answered by JenilVora
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