RSS Forums RSS
Please support our Pascal and Delphi advertiser: Programming Forums

Pascal : Cant see why program wont run, exits with error.

Join Date: Apr 2007
Location: Glasgow
Posts: 32
Reputation: adotl is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
adotl's Avatar
adotl adotl is offline Offline
Light Poster

Solution Re: Pascal : Cant see why program wont run, exits with error.

  #4  
Apr 25th, 2007
This is the solution I came up with a few minutes ago....

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.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:12 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC