Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
COBOL 0.85 KB | None | 0 0
  1.        program-id. Program1 as "FARANEIGHT.Program1".
  2.  
  3.        data division.
  4.        working-storage section.
  5.  
  6.        01 deg pic zzz.99 value 0.
  7.        01 degF pic zz9.99.
  8.        01 loopf pic 999 value 0.
  9.  
  10.        Screen section.
  11.        01 Screen1.
  12.            05 Blank Screen
  13.                foreground-color 14
  14.                background-color 4.
  15.            05 line 1 col 1 value "Here is the table".
  16.            05 line 2 col 1 value "Celcius       Faraneight".
  17.        
  18.    
  19.          
  20.  
  21.        procedure division.
  22.  
  23.        100Main.
  24.            display Screen1
  25.            display ""
  26.            perform until loopf > 150
  27.              perform 200Clac
  28.               display deg "           " degF
  29.               add 10 to loopf
  30.  
  31.            end-perform
  32.  
  33.            display "          Done"
  34.  
  35.            stop run.
  36.            
  37.  
  38.        200Clac.
  39.            compute degF rounded = ((5/9) * loopf ) + 32
  40.            move loopf to deg.
  41.  
  42.        end program Program1.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement