Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

1 #include <iostream>

2 using namespace std;


3 int main )
4
float m, 8, d, 1, s, b, y;
cout"gravity g = "s
cin>g
cout< mass m =
"s
cin>>m
cout" breath b = "$
cin>>b;
cout«" thickness d "
cin>>ds
4 cout" length 1 = "
15 cin>>l;
cout<" depression s ";
L7 cin>>s
cout <« m <« ** << g <« ** « 1 « "=" <« m"8"l <« endl;
18
cout« b «« *" «« s «« ** << d <« "" <« d <« "* <« d «« "=" <« b*s*d*d*d <e endl1;
19
y (mg1)/(6°sd*d*d);
return 03
simple pendulum.cpp
1 #include <iostream>
2 #include <cmath>
3 using namespace std;
4 int main()
5E
float 1, timePeriod;
7 const float g 9.8;
cout "Length of Pendulum ";
cin » l;
timePeriod (2* 3.14)sqrt(1 g);
cout " \n Time Period of Pendulum i s " <<
time Period;
12 return 0
13
CUsersiEIMIMA\Documentslyoungs modulus.exe
gravity g
mass m = 53
= 9.8
breath b = 43
thickness d = 53

length l =
72

depression s = 31
539.872=37396 . 8
4331535353=1.98453e+008

- = -
- -

Process exited after 24.97 seconds with return value e


Press any key to continue
CUsersElMIMA\Documents\simple pendulumexe
Length of Pendulum:23
Time Period of Pendulum is: 2.00607

Process exited after 3.312 seconds with return value


Press any key to continue

You might also like