+ 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:
3 Answers
+ 3
Try this solution.
https://code.sololearn.com/cK2mjzDv5kO1#cpp
0
question is of one or n numbers
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() ;
}