From 7bc77cb1ed33745c720952c92b3b2747c5cbf2df Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Sat, 3 Feb 2018 11:01:52 +0530 Subject: Added new code --- 3862/CH4/EX4.8/Ex4_8.sce | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 3862/CH4/EX4.8/Ex4_8.sce (limited to '3862/CH4/EX4.8/Ex4_8.sce') diff --git a/3862/CH4/EX4.8/Ex4_8.sce b/3862/CH4/EX4.8/Ex4_8.sce new file mode 100644 index 000000000..2d226987d --- /dev/null +++ b/3862/CH4/EX4.8/Ex4_8.sce @@ -0,0 +1,30 @@ +clear +// The composite section is divided into three simple figures, a triangle, a rectangle and a semicircle + +// +//variable declaration + +A1=1.0*3.0*4.0/2.0 //Area of 1,m^2 +A2=6.0*4.0 //Area of 2,m^2 +A3=1.0*%pi*(2**2)/2 //Area of 3**m^2 + +//The coordinates of centroids of these three simple figures are: + +X1=6.0+3.0/3.0 +X2=3.0 +X3=-(4*2)/(3.0*%pi) + +Y1=4.0/3.0 +Y2=2.0 +Y3=2.0 + +A=A1+A2+A3 + +xc=(A1*X1+A2*X2+A3*X3)/A + +printf("\n xc= %0.4f m",xc) + + +yc=(A1*Y1+A2*Y2+A3*Y3)/A + +printf("\n yc= %0.3f m",yc) -- cgit