home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / STEN / STEN10.MSA / PROGRAMS / PASCAL / CONV.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  2010-04-21  |  688 b   |  31 lines

  1. PROGRAM EX3_1;
  2.  
  3. {   This program converts an amount in pounds
  4.     sterling to US dollars usin the current
  5.     exchange rate of  £1 = $1.82.
  6.     Written by Justin Griffiths 24/09/91.       }
  7.  
  8. USES CRT;
  9.  
  10. VAR
  11.     Pounds : REAL;
  12.     Dollars: REAL;
  13.  
  14. PROCEDURE Enter_Pounds;
  15.     BEGIN
  16.          WRITELN('Enter your amount in pounds sterling ');
  17.          READLN(Pounds);
  18.          Dollars:= Pounds * 1.82;
  19.          WRITE('£');
  20.          WRITE(Pounds:8:2);
  21.          WRITE('  is equal to  $');
  22.          WRITELN(Dollars:8:2);
  23.          WRITELN('at the current exchange rate');
  24.          WRITELN(' of $1.82 to the £1.');
  25.      END;
  26.  
  27. BEGIN
  28.     CLRSCR;
  29.     Enter_Pounds;
  30. END.
  31. ə