blob: b12aec2535b829f0c934cb49f16c6f7f97a9d163 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//Ch25_Ex19
clc;
clear;
close;
vol=1; w=21/1000; //weight converted into kilogram
l=1*100; r=3/2; //since diameter=3cm
t=1; //thickness of metal
innerR=r; //inner radius
outerR=innerR+t; //outer radius
volIron= %pi*outerR^2*l-%pi*innerR^2*l;
weightPipe=volIron*w;
mprintf("The weight of the pipe is %.1f kg",weightPipe);
|