00  1-3 variables and expressions, 변수와 표현식
Channel: Fortran Tutorial
Date: 2022-09-03

program vertical   
  ! 
  ! Vertical motion under gravity   
  !
  implicit none

  ! acceleration due to gravity    
  real, parameter :: g=9.8

  !variables  
  real :: s        ! displacement 
  real :: t        ! time 
  real :: u        ! initial speed ( m / s) 

  ! set values of variables   
  t = 6.0   
  u = 60.0 
  
  ! calculate displacement   
  s = u * t - g * (t**2) / 2 
  
  ! output results 
  write(*,*) 'Time = ',t,'Displacement = ',s 

end program vertical

Uni. Of Cambridge
Dep. Of Physics
Computational Physics
Self-study guide 2
Programming in Fortran 95

Thanks to Dr. Rachael Padman and Michaelmas for allowing the citation.

참고사이트 https://www.mrao.cam.ac.uk/~rachael/compphys/SelfStudyF95.pdf

#fortran #Dr._Rachael_Padman_and_Michaelmas #fortran_tutorial #vfun #NAG_Fortran #FTN95