#include <iostream>
#include <stdio.h>
#include <string>
usingnamespace std;
int main()
{
int start ;
int finish;
bool PlayAgain = 0;
char PlayAgainAnswer;
do {
do {
cout << "what number would you like the computer to count to?: ";
cin >> finish;
cout << "what number would you like the computer to start at?: ";
cin >> start;
if (start >= finish)
cout << "The number you start at has to be smaller then the number your counting to. \n";
} while (start >= finish);
while (start <= finish){
cout << start << endl;
start = start + 1;
}
do {
cout << "Do you wanna play again? (y/n): ";
cin >> PlayAgainAnswer;
} while (PlayAgainAnswer != 'y' || 'n' || 'Y ' || 'N');
if (PlayAgainAnswer == 'y' || 'Y')
bool PlayAgain = 1;
if (PlayAgainAnswer == 'n' || 'N')
bool PlayAgain = 0;
} while (PlayAgain == 1);
return 0;
}
never stops asking "Do you wanna play again? (y/n): "