+ 2

Solve this.Easy level..XD

»Create a program that can sum all odd number that user key in. »Sample input: -Please key in first number: -Please key in second number: »Sample output: -Total sum of odd number is:

27th Sep 2016, 3:42 AM
Capr_Ver
Capr_Ver - avatar
3 Answers
27th Sep 2016, 5:23 AM
Chris G
Chris G - avatar
0
question is of one or n numbers
31st Oct 2016, 4:14 PM
Gaurav Arora
Gaurav Arora - avatar
0
#include <iostream.h> #include<conio.h> void main() {int a, b,sum; Cout<<"\n please key in first number"; Cin>>a; Cout<<"\n please key in second number"; Cin>>b; Sum=a+b; { If(a%2==0&&b%2==0) Cout<<"\n total sum of odd numbers is"; Else Cout<<"\n enter odd numbers only"; } Getch() ; }
4th Nov 2016, 3:23 PM
Aditya