i wrote a program and it worked fine, but i added a case swich just so the user didnt have to reopen the program everytime he/she wanted to recaluclate, but it doesn't work. Can someone tell me whats wrong?
Code:int repeat() { int yesno; cout << "\nWould you like to calculate again? y/n : "; cin >> yesno; switch( yesno ) { case 'y' : start(); break; case 'n' : return 0; break; default: cout << "Not an option!"; return repeat(); break; } }