Question: Accept two numbers and find their sum and difference. If the sum is more than the difference, display the sum otherwise display the difference. Odd

Accept two numbers and find their sum and difference. If the sum is more than the difference, display the sum otherwise display the difference. Odd & Even Number program using loop (repeat 5 time)

#include using namespace std;

int main() { int n; for(int i = 0;i < 5;i++) { cin >> n; if(n%2 == 1) cout << "Odd "; else cout << "Even "; } return 0; }

-------------using C++-------------------

Modify the program to use these functions void informUser(); void checkSum(int); int add(int,int);//return A VALUE void enterNumbers(int&,int&);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!