Computer Science, asked by shagufaaa, 28 days ago

write a program to input a two digit number and check if the both the digits are even or both the digits are odd or the number is a combination of odd and even digit
sample input - 45
sample output - the number is a combination of odd and even digit
sample input - 42
sample output - both the digits are even digits ​

Answers

Answered by borhaderamchandra
1

Answer:

main()

{

int n;

print("input number");

scanf("%d",&n);

a=n%10;

b=n/10;

if(a%2=0 && b%2=0)

{printf("both digits are even)

else

printf("both digits are odd")

}

if(a%2=0 && b%2!=0)

print f("number is combination of even and odd digit)

else

if(a%2!=0 && b%2=10)

printf("number is combination of odd n even")

}

Similar questions