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.

6 Years
Discussion Span
Last Post by jonsca

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.