fork download
  1. program DangerousMath
  2. IMPLICIT NONE
  3. integer, parameter :: dp=selected_real_kind(15)
  4. integer :: n = 9
  5. real (dp) :: a, b, x, I, K, mu, c
  6. character (10) :: Name
  7.  
  8. a = 3
  9. b = (n+3)/ 5
  10. x = 5.75
  11. I = 3.141959
  12. K = x/ 2.0
  13. mu = 1.0 / 5.75
  14.  
  15. write (*,*) "Please enter your Name:"
  16. read (*,*) Name
  17. write (*,*) "Hello ", Name
  18. write (*,*) a, b, x, I, k, mu
  19.  
  20. write (*,*) "Enter a value for A and B"
  21. read (*,*) A, B
  22. c = ((A + B)**2 - 2*A*B - B**2)/(A**2)
  23. write (*,*) c
  24.  
  25.  
  26. stop
  27.  
  28. end program DangerousMath
  29.  
Success #stdin #stdout 0.01s 2620KB
stdin
Dakota,

0.000001, 888.0 
stdout
 Please enter your Name:
 Hello Dakota    
   3.0000000000000000        2.0000000000000000        5.7500000000000000        3.1419589519500732        2.8750000000000000       0.17391304671764374     
 Enter a value for A and B
  0.96633812063373636