blob: a5059bfc4af12b00969f4e27910a95ddff7f58ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
clear
//
//Given
//Variable declaration
D1=40 //Larger diameter in mm
D2=20 //Smaller diameter in mm
L=400 //Length of rod in mm
P=5000 //Axial load in N
E=2.1e5 //Youngs modulus in N/sq.mm
//Calculation
dL=((4*P*L)/(%pi*E*D1*D2)) //extension of rod in mm
//Result
printf("\n Extension of the rod = %0.3f mm",dL)
|