cybernursery
asked on
Input validation code in Pascal
Dear Programmers
Could you please supply me with a piece of code in Pascal (Turbo 7) to answer the following problem:
Ask the user to input a number. If the number is less than 0 or more than 100 the user is asked to
re-enter the number.
Could you please supply me with a piece of code in Pascal (Turbo 7) to answer the following problem:
Ask the user to input a number. If the number is less than 0 or more than 100 the user is asked to
re-enter the number.
It's a repeat loop
repeat
code
until number_meets_requirements
OK, now you have to work out what number_meets_requirements is.
Hmm, if this is homework or schoolwork which is what it seems, you have serious problems if you don't understand this type of pascal construct.
repeat
code
until number_meets_requirements
OK, now you have to work out what number_meets_requirements is.
Hmm, if this is homework or schoolwork which is what it seems, you have serious problems if you don't understand this type of pascal construct.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
eddie... :(
If people will keep doing his work for him he'll never learn to do something this simple himself.
If people will keep doing his work for him he'll never learn to do something this simple himself.
ASKER
First of all thanks to eddiejr, I was aware of the code but I wanted to be sure that I answered correctly. This was my first time. Next time I paste the code and ask for your comments.
Both of you violate EE's rules. I will inform community support about this.
We're not allowed to do your homework. I'm sorry if my messages were a bit weird and stupid, but we're not allowed to do that for you. Homework is intended to be made by you as to learn from it...
CJ