Answers for "how to make a c++ iostream program restart when finished"

C++
0

how to make a c++ iostream program restart when finished

if (whatever condition)
    correct();
else
{
    incorrect();
    cout << "Enter y to restart: ";
    char c;
    cin >> c;
    if (c == 'y')
        continue;
    else
        return 1;
}
Posted by: Guest on August-14-2020

Browse Popular Code Answers by Language