### Help me...

I began my college information system.
I'm attending a substance called Data Structure.
It was after a year in which my professor asked the following theme: Build a program that reads two numbers and one of the four mathematical operations. The program should display the result of the operation informed.
It is required to use the functions and procedures.

I am a beginner and any help is welcome ...
I'm unsure of what you are asking exactly. I wrote this for you. Maybe it can give you a good foundation?

 ``1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465`` ``````#include using namespace std; int add(int, int); int sub(int, int); int division(int, int); int mult(int, int); int main() { int numOne, numTwo, choice; cout << "Enter 2 numbers:\t"; cin >> numOne >> numTwo; cout << endl << "Enter 1 for addition, 2 for subtraction, 3 for division, or 4 for multimplication:\t"; cin >> choice; cout << endl; switch(choice) { case 1: cout << add(numOne, numTwo) << endl; break; case 2: cout << sub(numOne, numTwo) << endl; break; case 3: cout << division(numOne, numTwo) << endl; break; case 4: cout << mult(numOne, numTwo) << endl; break; default: cout << "That is an invalid choice" << endl; } system("pause"); // may not need this return 0; } // end int main() int add(int x, int y) { return x+y; } int sub(int x, int y) { return x - y; } int division(int x, int y) { return x/y; } int mult(int x, int y) { return x * y; } ``````
Topic archived. No new replies allowed.