Tuesday 5 September 2017

C++ Program to check whether a number is even or odd


In this program, we first enter a number (say 10). Then check the condition (10%2). If it gives result zero(0), then then it prints the message number is even and if it is non zero(0),then it prints the message number is odd.


for any other queries comment below....

No comments:

Post a Comment

Nested If-else : To find the roots of quadratic equation ax2+bx+c=0 and a!=0

let ax 2 +bx+c=0 : is a quadratic equation output:             Enter the values of a,b,c : 1 -5 6             roots are x1=3  x3=...