DEV Community

Discussion on: need help with c++ calculator

Collapse
 
codemouse92 profile image
Jason C. McDonald • Edited

It sounds like you're making the jump from having all the steps happen the same way in order, to working with functions.

Get out a literal piece of paper and figure out the following:

  • What information do you need to store as the program runs?

  • Break the problem down into pieces. What do you need to be able to do? e.g. you should be able to add, subtract, etc. Each piece should probably be a separate function.

  • What information do you need from the user? How do you want to ask them for it? How will you store it?

You'll do well to review and make use of the following programming structures:

  • Loops

  • Conditional statements

  • Functions