| | |
Pascal : Cant see why program wont run, exits with error.
Thread Solved |
Im failing to see what Ive done wrong, the syntax is right but the program wont run for me when I enter in a the else statement works tho....
Any ideas? Im guessing its something stupid, I just cant seem to see it at the moment.
Pascal and Delphi Syntax (Toggle Plain Text)
program Word (input, output); uses crt; var number : integer; letter: string; begin {------------Introduction & Setup------------------} clrscr; {------VERY User-Friendly------} Repeat writeln('Whats the right letter? '); readln(number); str(number,letter); if (letter ='a') then writeln('Correct Answer ') else writeln(' a needs to be entered'); Until (letter = 'a'); {-------------------Printing Results------------------} writeln('The answer is ', letter); readln; end.
Last edited by adotl; Apr 24th, 2007 at 7:38 pm.
This is the solution I came up with a few minutes ago....
Pascal and Delphi Syntax (Toggle Plain Text)
program Word (input, output); uses crt; var letter: string; begin {------------Introduction & Setup------------------} clrscr; {------VERY User-Friendly------} Repeat writeln('Whats the right letter? '); readln(letter); if (letter = 'a') OR (letter = 'b') then writeln('Correct Answer ') else writeln(' a needs to be entered'); Until (letter =UPCASE('a')) OR (letter = 'b'); {-------------------Printing Results------------------} writeln('The answer is ', letter); readln; end.
![]() |
Similar Threads
- build but wont run... hmmm please help. (C++)
- my program is compiled.but on run that i have message "Exception in thread "main" jav (Java)
- Dell wont run (Troubleshooting Dead Machines)
- Script wont run on different computer (Python)
- My c++ cgi-bin program wont allow access to files (C++)
- Program security (When Launched) (C)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: Pascal : Variable for both integer & string?
- Next Thread: help me plssss
| Thread Tools | Search this Thread |





