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.2
  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.7731849    
  0.30000001       2.1372960    
  0.40000001       2.2220476    
  0.50000000       2.2343109    
  0.60000002       2.2358520    
  0.70000005       2.2360415    
  0.80000007       2.2360647    
  0.90000010       2.2360675    
   1.0000001       2.2360678    
   1.1000001       2.2360680    
   1.2000002       2.2360680    
   1.3000002       2.2360680    
   1.4000002       2.2360680    
   1.5000002       2.2360680    
   1.6000003       2.2360680    
   1.7000003       2.2360680    
   1.8000003       2.2360680    
   1.9000003       2.2360680    
   2.0000002       2.2360680