0
can't we use "break" to if statement....??? then, what do i want do to stop the if statement after the results.... beacause, i have written a code with options. one of the options from them is "exit". so, i want to exit the program when i select exit... please help me......
4 Réponses
+ 2
When the user exits, just make the program return 0 from main. That will safely stop the program, just like you want.
0
u can use try catch block if u want to terminate ur program with a specific code
0
If,,,,else,,,
0
You can use exit(); function. But in this case it totally comes out of ur program and it does not need any conditions.