0
Write a c program
Write a program to check if a number is even or odd with the help of switch-case construct and without using any if-else construct.
4 Answers
+ 2
You just need to use the result from <number> modulo-by 2 for the switch subject. Then you go check whether it was zero (even number), or one (odd number).
Go ahead try it out!
0
Dont forget about "break;" in switch-case construct
0
Thank u