Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Programming help

Name: Nobledragon 2006-09-10 16:38

Hi,

This is my first time posting to a 4Chan text board so i apologize if i seem a bit selfish asking for help in my first post but this is the only board that im confident has frequent users.

Here is my question:
For a homework assignment in C/C++ i need to have some code that will terminate the program if the user inputs a value outside of a preset range. Ive looked through the book and all the class notes i have and cant seem to find any reference on how to make that happen. I know someone here should be able to give me an idea on how to do this.

Name: Nobledragon 2006-09-10 20:42

>>9

Actually i just got it done. Just needed help figuring out how to get the program to terminate on an invalid input. Ended up using 'if' and 'else' statements to make it work. Also i was looking for a command word or something that can just be put into the code like a 'break' command with 'switch' statements. Anyways thanks for the help guys, at least i now know where to go to get some answers.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List