summaryrefslogtreecommitdiff
path: root/1991/CH2/EX2.27/27.sce
blob: eba802b79257fbdb5afb3e075c10923062b199f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
clc
clear
//input
p1=2.3//period of pendulum
p2=3.1//period when pendulum is lengthened
//calculation
g=4*%pi^2/(p2^2-p1^2)//acceleration of free fall
l=p1^2*g/(4*%pi^2)//length of pendulum
//output
printf("the acceleration of free fall is %3.3f m/s^2",g)
printf("\n the length of pendulum is %3.3f m",l)