Hi,
Would anybody know a way to repeat a program, for example the user has reached the end and a prompt is shown on screen Would you like to try again? Press y, n. I have managed to do this using goto command but this as ive read is a no go zone unless really needed. I have also found bool to be of some use.
Also i have 3 if statements working to filter through a user value that has to be between 3 and 31 and odd.
cout << "Please enter an odd value between 3 and 31: " << endl;
cin >> rate;
myWaveForm.getSampleValue( rate );
cout << endl;
//upto here we have a value that the user has entered
if ( rate % 2 != 1 ){
else rate = rate; }
if ( rate <3 ){
if ( rate > 31 );}
else rate = rate;
Is there a way of simplifying this?