Help with Program! Im new at this

I am just learning how to program and need help, I have no clue what to do. Everything I have tried has been a miserable failure. Help is appreciated thanks!

My teacher asked us to do this: The Problem:
Write a program that will allow the user to input a minimum and maximum integer. Then, the program should ask the user if they would like to count or sum the integers. If the user chooses to count the numbers, the program should list all of the integers from the minimum to the maximum. If the user chooses to sum, the program should sum all the integers from the minimum to the maximum.

Test Data:
The user inputs 1 as the minimum number and 5 as the maximum. They choose to count. The program outputs 1 2 3 4 5.

The user inputs 1 as the minimum number and 5 as the maximum. They choose to add. The program outputs 15.
//1 + 2 + 3 + 4 + 5 = 15

I have no clue what to do.

Start with:
Write a program that will allow the user to input a minimum and maximum integer.

I know how to get a max and min int but that's about it I literally just started programming
That's good. Now that you've accomplished that you can move on to the next step:
the program should ask the user if they would like to count or sum the integers.
If I knew how to do that I would've done it already man I have no clue how to do that
repeat a similar process for the second step. ask what they want to do. they have two choices to pick from. Store their answer in a variable
I don't know how to do that. I was hoping someone could show me a code that works and explain the steps
Algorithm:
1. Get the min value ------------ cin
2. Get the max value
3. Get the choice
Take the action according to the choice (You can use either switch or if statement here)
I don't know how to do that. I was hoping someone could show me a code that works and explain the steps


You don't know how to ask the user if they would like to count or sum the integers, but you do know how to ask for and store a min and max value?

I think now would be an excellent time to review your book or instructional material and actually make an attempt at coding a solution, rather than attempting to get others to do it for you.
Topic archived. No new replies allowed.