fork download
  1. PROGRAM Arithmetic
  2. !-----------------------------------------------------------------------------------------------------------
  3. !Emilio Paleo ENGR 225 January 19. 2012
  4. !` ASSIGNMENT #1
  5. !Program to ass two real numbers. Variables used are:
  6. ! X, Y : two real numbers
  7. ! Sum : the sum of X and Y
  8. !
  9. !Output: X, Y, and Sum
  10. !------------------------------------------------------------------------------------------------------------
  11.  
  12. IMPLICIT NONE
  13. REAL :: X, Y, SUM
  14.  
  15. X=3.14
  16. Y=2.057
  17. Sum = X + Y
  18. WRITE (*,*) "Sum of", X, " and", Y, " is", Sum
  19.  
  20. END PROGRAM Arithmetic
Success #stdin #stdout 0.02s 2620KB
stdin
stdout
 Sum of   3.1400001      and   2.0569999      is   5.1970000