C Problem (Reading in input from user with loops)
Hi this is just a simple question for programing in C.
I have my main function using a while loop that gets 1 character at a time from the user.
When the user enter '1' it calls a different method add().
add() also asks the user for some input and does a simliair loop asking scanning in 1 character at a time.. The problem is that when I try inputing something in now it jumps back to the main loop.
Please enter choice from 1-6:
(I enter 1)
It calls add()
Please enter number:
(I enter 54)
It goes back to the main method without doing anything and gives me:
Error: Please only enter number from 1-6.
How do i make it so it stays in the add method until i actually return?
By Transform in forum Java
Last Post: 11-18-2005, 06:54 PM
By webchetan in forum ASP.NET
Last Post: 11-16-2005, 06:01 AM
By Gerardo Gomez in forum VB Classic
Last Post: 06-26-2000, 12:34 PM
By oSSiE in forum ASP.NET
Last Post: 05-01-2000, 07:53 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center