fork download
  1. program esfera
  2. implicit none
  3.  
  4. integer :: i, nc
  5. real :: xi, xf, tp, V, t, n, k, dVdt
  6.  
  7. xi=0.0
  8. xf=5.0
  9. tp=0.1
  10. V=0.0
  11. t=xi
  12. n=2.0
  13. k=-0.0009
  14.  
  15. nc=20
  16.  
  17.  
  18. print*,t,V
  19.  
  20. do i=1,nc
  21.  
  22. dVdt=9.81-9.81*k*(V**n)
  23. V=V+tp*dVdt
  24. t=t+tp
  25.  
  26. Print *, t, V
  27.  
  28. enddo
  29.  
  30. end program esfera
Success #stdin #stdout 0.01s 2620KB
stdin
Standard input is empty
stdout
  0.00000000E+00  0.00000000E+00
  0.10000000      0.98100007    
  0.20000000       1.9628497    
  0.30000001       2.9472516    
  0.40000001       3.9359207    
  0.50000000       4.9305983    
  0.60000002       5.9330621    
  0.70000005       6.9451413    
  0.80000007       7.9687281    
  0.90000010       9.0057926    
   1.0000001       10.058400    
   1.1000001       11.128724    
   1.2000002       12.219070    
   1.3000002       13.331893    
   1.4000002       14.469819    
   1.5000002       15.635677    
   1.6000003       16.832523    
   1.7000003       18.063679    
   1.8000003       19.332766    
   1.9000003       20.643755    
   2.0000002       22.001017