Guest_imported
New member
- Jan 1, 1970
- 0
I'm writing a program that generates pythagorean triples for a summer project in math. I have a problem however... the main loop repeats indefinitly so that the user can continue to generate pythagorean triples, but I want the user to have the ability to break the loop and exit the program at any time by pressing a certain key, such as the "~" for example. How can I do this so that the main loop can still repeat but the user can exit at any time? What can I do so that the rest of the commands can still be carried out, but the program will be checking for the user to hit the ~ key the entire time?? Is this even possible? Thanks.