Open Source Development Tutorials | Newsletter Signup | About Us
Search  

Go Back   Open Source Tutorials Forum > Programming Languages > C and C++ Programming
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-04-2007, 05:56 AM
jack1234 jack1234 is offline
Junior Member
 
Join Date: Nov 2007
Posts: 2 jack1234 is on a distinguished road
Default if statements

Guys how do I write a statement that must accept a certain interger between a specified range before the rest of the program can continue?

If(n<8)
Printf(“please enter a num less than 8);

I want the program to stop here until a num less than 8 is entered then continue with the rest of the statements once a num less than 8 is entered.

Next how can I let the user enter a letter to exit the program or enter another letter to restart the program(start the program back from the first statement)
Is there a way a user can input a letter and a specific function or part of the codes can be executed as well?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -5. The time now is 06:57 AM.


Powered by: vBulletin Version 3.0.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright 2004 - 2006 GrindingGears.com. All Rights Reserved.