Howdy, I have an assignment which requires that I get user input for 3 different variables, each in it's own function. These three functions are called by another function, which is called by main to begin with. Each of these inputs have a range that the input must be in. I've got the input range fine, and the functions return their boolean output correctly. However, we also need to kick the user out the program if he/she enters an out of range input for any of the entries.
If we aren't allowed to use exit or abort, I'm assuming this is done by ending the program through main, though I'm not exactly sure how to do it. Obviously I should use an if or something, but as for how (and where for that matter) to implement it, I'm ridiculously lost. My C programming skills are lacking :(
So I guess my questions are:
Should the if/else go in main, the function that calls the input functions, or the input functions themselves?
Does the condition of the if/else use the boolean outputs of the input functions? Or does it use brand new variables or the input variables the user entered?
Any help would be GREATLY appreciated.