Link to home
Start Free TrialLog in
Avatar of cybernursery
cybernurseryFlag for Malta

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.
Avatar of CJ_S
CJ_S
Flag of Netherlands image

Or did you misunderstood the teacher?

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
Avatar of dbrunton
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.
ASKER CERTIFIED SOLUTION
Avatar of eddiejr
eddiejr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nrico
nrico

eddie... :(

If people will keep doing his work for him he'll never learn to do something this simple himself.
Avatar of cybernursery

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.