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.0005
  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.9615281    
  0.30000001       2.9406409    
  0.40000001       3.9173994    
  0.50000000       4.8908720    
  0.60000002       5.8601389    
  0.70000005       6.8242946    
  0.80000007       7.7824516    
  0.90000010       8.7337437    
   1.0000001       9.6773291    
   1.1000001       10.612393    
   1.2000002       11.538152    
   1.3000002       12.453852    
   1.4000002       13.358776    
   1.5000002       14.252243    
   1.6000003       15.133610    
   1.7000003       16.002272    
   1.8000003       16.857668    
   1.9000003       17.699278    
   2.0000002       18.526621