I seem to be asking alot of questions but C++ is fun ! I was wandering how I could get my program to exit whenever 7 is entered and I was wandering about how I would clear the screen when the user wnats to do another calculation.
I seem to be asking alot of questions but C++ is fun ! I was wandering how I could get my program to exit whenever 7 is entered and I was wandering about how I would clear the screen when the user wnats to do another calculation.
Remember to check the FAQ for your questions
Here are the answers...
http://faq.cprogramming.com/cgi-bin/...&id=1043284385
http://faq.cprogramming.com/cgi-bin/...&id=1043284385
You could check user imput with a simple if statement and to clear the screen you could use system("cls"); that is if your using windows.
I think people are forgetting about return these days...Code:if(input == 7) { return 0; }
Seems simple enough for me, and that's saying a lot
Stupid things pop singers say
"I get to go to lots of overseas places, like Canada."
- Britney Spears
"I love what you've done with the place!"
-Jessica Simpson upon meeting the Secretary of Interior during tour of the White House
yes main is a int function so it should return a value
Is there a reason you failed to learn the answers to your questions from your last two posts:
http://cboard.cprogramming.com/showthread.php?t=62144
http://cboard.cprogramming.com/showthread.php?t=62128
And check this out before using cgod's solution:
http://www.cprogramming.com/tips/sho...ount=30&page=0