blob: 4907de9fe8a036b96a8118e6993372e74548e59b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Problem 1.5,Page no.11
clc;clear;
close;
//Circle-1
a_1=100*%pi //cm**2
x_1=10 //cm
//Square-2
a_2=50 //cm**2
x_2=15 //cm
//Calculation
X_bar=(a_1*x_1-a_2*x_2)*(a_1-a_2)**-1 //cm
//Result
printf("The centre of gravity is %.2f cm",X_bar)
|