How to get my if statement to repeat

Basically the question is

"Chocolate Delights Candy company manufactures several types of candy. Write a program that accepts a candy number (whole number only ), price per pound, and average number of pounds sold in a month. The program should display the candy number as a best selling candy only if the average sold is over 2000 pounds."

Which i got it to do but im not sure if for this program it has to repeat if the input for avg pounds of candy sold isn't over 2000

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
using namespace std;
int main()
{
    int candynum;
    float pricePerPound, poundsSoldPerMonth;
    
    cout << "Please enter the number of the candy and its price per pound along with the average pounds of candy sold per month" << endl;
    cin >> candynum >> pricePerPound >> poundsSoldPerMonth;
    
    if (poundsSoldPerMonth >= 2000) {
        cout << "The best selling candy is " << candynum << endl;
    }
    
}
Could you try explaining that again? I think I understand what you want, in which case you will want to use a loop of some kind.
http://www.cplusplus.com/doc/tutorial/control/#loops
The program runs correctly only displaying the last cout if the input of poundsPerMonth is above or equal to 2000 but if its less than 2000 the program will stop running. I want it to ask the question again every time its under 2000, the first cout in the program
Topic archived. No new replies allowed.