fork download
  1. program dangerousmath
  2. implicit none
  3. integer, parameter :: dp=selected_real_kind(15)
  4. real :: a, b, x, c
  5. integer:: i, k, n = 9, mu
  6. character (10) :: name
  7. a=3
  8. b=(n+3)/5
  9. x=5.75
  10. i=3.141959
  11. k=x/2.0
  12. mu=1./5.75
  13. write (*,*) "please enter your name"
  14. read (*,*) name
  15. write (*,*) "hello", name
  16. write (*,*)a,b,x,i,k,mu
  17. stop
  18. write (*,*) "enter a value for a and b"
  19. read (*,*) a, b
  20. c = ((a +b)**2 - 2*a*b - b**2) /a**2
  21. write (*,*) c
  22. stop
  23. end program dangerousmath
Success #stdin #stdout 0.01s 2620KB
stdin
emilio 0.0001 888.0
stdout
 please enter your name
 helloemilio    
   3.0000000       2.0000000       5.7500000               3           2           0