Home » Archimedes archive » Micro User » MU 1991-10.adf » Listings » Routines/Cvrt2

Routines/Cvrt2

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Micro User » MU 1991-10.adf » Listings
Filename: Routines/Cvrt2
Read OK:
File size: 0102 bytes
Load address: 0000
Exec address: 0000
File contents
PROGRAM Cvrt2 (Faren --> Cent)
VAR Farenheit : real ;
    Centigrade : real ;
BEGIN
  WRITE('Temperature in degrees Farenheit = ');
  READLN(Farenheit);
  Centigrade := (Farenheit - 32) / 1.8;
  WRITELN('In degrees Centigrade that is ',Centigrade:4:1);
END.
00000000  50 52 4f 47 52 41 4d 20  43 76 72 74 32 20 28 46  |PROGRAM Cvrt2 (F|
00000010  61 72 65 6e 20 2d 2d 3e  20 43 65 6e 74 29 0d 56  |aren --> Cent).V|
00000020  41 52 20 46 61 72 65 6e  68 65 69 74 20 3a 20 72  |AR Farenheit : r|
00000030  65 61 6c 20 3b 0d 20 20  20 20 43 65 6e 74 69 67  |eal ;.    Centig|
00000040  72 61 64 65 20 3a 20 72  65 61 6c 20 3b 0d 42 45  |rade : real ;.BE|
00000050  47 49 4e 0d 20 20 57 52  49 54 45 28 27 54 65 6d  |GIN.  WRITE('Tem|
00000060  70 65 72 61 74 75 72 65  20 69 6e 20 64 65 67 72  |perature in degr|
00000070  65 65 73 20 46 61 72 65  6e 68 65 69 74 20 3d 20  |ees Farenheit = |
00000080  27 29 3b 0d 20 20 52 45  41 44 4c 4e 28 46 61 72  |');.  READLN(Far|
00000090  65 6e 68 65 69 74 29 3b  0d 20 20 43 65 6e 74 69  |enheit);.  Centi|
000000a0  67 72 61 64 65 20 3a 3d  20 28 46 61 72 65 6e 68  |grade := (Farenh|
000000b0  65 69 74 20 2d 20 33 32  29 20 2f 20 31 2e 38 3b  |eit - 32) / 1.8;|
000000c0  0d 20 20 57 52 49 54 45  4c 4e 28 27 49 6e 20 64  |.  WRITELN('In d|
000000d0  65 67 72 65 65 73 20 43  65 6e 74 69 67 72 61 64  |egrees Centigrad|
000000e0  65 20 74 68 61 74 20 69  73 20 27 2c 43 65 6e 74  |e that is ',Cent|
000000f0  69 67 72 61 64 65 3a 34  3a 31 29 3b 0d 45 4e 44  |igrade:4:1);.END|
00000100  2e 0d                                             |..|
00000102