How do i get this code to loop infinitely until the user tells it to stop?
# include <iostream>
# include <cmath>
using namespace std;
double average, sd, s1, s2, s3, s4, deviation;
cout << "Press enter after entering a value.\n";
cout << endl;
cout << "Enter score one: ";
cin >> s1;
cout << "\nEnter score two: ";
cin >> s2;
cout << "\nEnter score three: ";
cin >> s3;
cout << "\nEnter score four: ";
cin >> s4;
sd = sqrt(deviation);
cout << "\nThe average of your four scores is "<<average<<".\n";
cout << "The standard deviation of your scores is "<<sd<<".\n";
what i mean is that i would like the user to be able to repeat the program. i would like the user to be able to input different scores each time. This would happen over and over again until the user wanted to stop. For instance,
"would you like to run the program again? y or n"
then they would hit "y" as long as they wanted to use the program. when they want to quit, they would hit "n"