C programing

ankushgupta's Avatar, Join Date: Aug 2007
Newbie Member
Q. 1 Write algorithm for the following :
a) to check whether an entered number is odd / even.
b) to calculate sum of three numbers.

pls. solve this.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Solution 1:
Code:
if(num % 2 == 0)
  Num is Even
else
  Num is Odd
Solution 2:
Code:
res = a+b+c;