blob: 75b42114248ec3bcf02ccb7d41800a180efa0ed6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
clc
clear
//INPUT DATA
T=2.223;//Time taken for 1 oscillation in sec
L=1.228;//Length of the pendulum in m
//CALCULATIONS
g=((4*3.14^2*L)/(T^2));//Acceleration due to gravity in m.s^-2
//OUTPUT
mprintf('The acceleration due to gravity is %3.2f m s^-2',g)
|