Help with loop statements.
Hello. My program doesn't loop accordingly as I'd want it to. I'm trying to make it loop whenever the burger input is greater than 5, asking the same question if the input is such. ", we can only make a maximum of 5 burgers at the moment. How many would you like?" cin >> burger; The line above to be exact, I wish to put it in a loop whenever the input is >5. The program: #include<iostream> #include <string> using namespace std; int main() { int burger = 0; string name; cout << "What's your name?"; cin >> name; cout << "Hello, " << name << "! How many burgers would you like?" << endl; cin >> burger; if (burger > 5) { cout << name << ", we can only make a maximum of 5 burgers at the moment. How many would you like?" << endl; cin >> burger; } else { cout << "Your food is coming." << endl; } system("pause"); }