You can do it but it will require a lot of nested if statements. You could either have a command on each level and have the user only exit one level at a time --> e.g., login -> choose menu item 1 ->into menu 2->exit->back to first menu->exit->logged out -or- you could just call exit(0) whenever the user types in exit. The latter may become more error prone.
Is "if" statements the only thing you have covered so far? Anything with arrays or functions? Those two things might make this slightly easier.
Salem commented: *agrees* +19
tux4life commented: *agrees* +6
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
j4jawaid commented: Thanks. +1
Salem commented: You tell 'em! :) +18
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
tux4life commented: Good hints :) +6
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
Ancient Dragon commented: good answer :) +25
froggy1976 commented: thanks! +1
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
ddanbe commented: Nice guidance! +6
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
Salem commented: Works for me :) +18
Nick Evan commented: Haha :) +12
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
Sivyo commented: Thanks this is the answer. So obvious, don't know why I didn't see it +0
Geekitygeek commented: very well put :) +1
cwarn23 commented: Thanks for pointing out the error... +0
sknake commented: good advice +6
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
tux4life commented: Excellent post :) +6
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
shishio1014 commented: hes a good programmer +1
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
Salem commented: Well said! +17
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
Excizted commented: Thanks for helping :) +1
Ancient Dragon commented: Very helpful -- I couldn't figure it out either. +25
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
restrictment commented: Yeah, very helpful +1
MrJNV commented: Damn helpful. +1
ddanbe commented: Good thinking! +6
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
Thumb2 commented: Straight to the solution +0
MrJNV commented: Helped a major issue +1