Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Period of a Pendulum The period of an oscillating pendulum T (in seconds) is giv

ID: 3850053 • Letter: P

Question


Period of a Pendulum The period of an oscillating pendulum T (in seconds) is given by the equation T = 2 pi Squareroot L/g where L is the length of the pendulum in meters, and g is the acceleration due to gravity in meters per second squared. Write a Fortran program to calculate the period of a pendulum of length L. The length of the pendulum will be specified by the user when the program is run. Use good programming practices in your program. (The acceleration due to gravity at the Earth's surface is 9.81 m/s^2.)

Explanation / Answer

! This program calculate the Period of the pendulum of length L in meter
program pendulum
    REAL L,T,PI,G
    PI = 3.1415
    G = 9.81 !accelaration due to gravity 9.81 m/s2
    PRINT *, "Enter the lenght of pendulum in meters"
    READ(*,*) L
    PRINT *," you have entered lenght of pendulum in meters is ", L
    P=2*PI*SQRT( L/G )
    PRINT *,"Period of the oscillating pendulum is = ", P
end program pendulum