fork download
  1. PROGRAM Arithmetic
  2. !--------------------------------------------------------------------------------------------------------------
  3. !Dakota Gillette
  4. !This program will add together two real numbers. Variables used are:
  5. ! X, Y : the two real numbers
  6. ! Sum : the sum of X and Y
  7. !
  8. !Output: X, Y, Sum
  9. !--------------------------------------------------------------------------------------------------------------
  10.  
  11. IMPLICIT NONE
  12. REAL :: X, Y, Sum
  13.  
  14. X = 3.14
  15. Y = 2.057
  16. Sum = X + Y
  17. WRITE (*,*) "Sum of", X, " and", Y, " is", Sum
  18.  
  19. END PROGRAM Arithmetic
Success #stdin #stdout 0.02s 2620KB
stdin
Standard input is empty
stdout
 Sum of   3.1400001      and   2.0569999      is   5.1970000