Please help me solve this problem, just started c++ and I am lost, this my 1st computer class, please help

Write an interactive program that prompts the user for two integers (X and Y) and a value Option) indicating an option. Depending on the value of the option, the program will perform different operations.

Value of Option Operations
1 X + Y
2 X - Y
3 X * Y
4 X / Y

Program requirements:
- The program must at least contain four (4) functions where each does one of the above operations.
- The program must be fully documented.

Recommended Answers

and what you have done so far?

Jump to Post

All 3 Replies

and what you have done so far?

I did
# include < iostream
Int X,Y
cout<< " Enter value X" << end 1;
cin >> x+Y
cout<< : Enter Y" << end 1;
cin>> x-y

Note that it's "endl" with an 'L'

Take in your X and Y (you can't read into a algebraic relation like X+Y), also note that "x" as an identifier is different from "X".

Do the program a step at a time. Firstly, make sure your include directive is complete (you're missing a ">"). main should return an int always, according to the standard. Make it so your program reads in the numbers and an option, and spits back "6 + 3" or whatever the user entered.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.