Please Help! Mayday open Exams

Design a function to act as calculator for performing: addition, subtraction, multiplication and division. no idea...helppp brothers and sisters.
www.google.com
Please a guide...a brief guide on how to start....please
http://www.cplusplus.com/doc/tutorial/functions/

Figure out what your function needs to perform its duty. Those are the function arguments.

Figure out what the function needs to report when it is finished performing its duty. That's the function's return value.

Beyond that, review what you learned in class.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>

using namespace std;

int calc(const int op1, const int op2, const char operation)
{
  switch(operation)
  {
    case '+':
      return op1 + op2;
    case '-':
      return op1 - op2;
    // and so on
  }
}
int main()
{
  

  system("pause");
  return 0;
}
This is a pretty common assignment. Search this forum for "calculator" and you'll find lots of help.
i am a novice help. exam tips.
Thomas1965 (1713). thank you but am still lost...could you further help please faithful thomases.

dhayden help
Blindly repeating "help, help, help" will get you nowhere nice.
(James Brown at the end of Blues Brothers 2000 was an exception.)

You seem to need these too:
http://www.cplusplus.com/doc/tutorial/basic_io/
http://www.cplusplus.com/doc/tutorial/control/
closed account (48T7M4Gy)
http://www.dummies.com/programming/cpp/how-to-create-a-calculator-with-the-switch-statement-in-c/

And just in case:
http://www.dummies.com/computers/pcs/how-to-turn-on-your-pc/
http://www.wikihow.com/Cut-and-Paste
https://www.youtube.com/watch?v=MhXXYuCpVwc
closed account (48T7M4Gy)
http://www.cplusplus.com/forum/general/204709/
Topic archived. No new replies allowed.