summaryrefslogtreecommitdiff
path: root/1553/CH25/EX25.14/25Ex14.sce
blob: b6eeef7affd6e900885b9d4f3137132e3b8e2e3b (plain)
1
2
3
4
5
6
7
8
9
10
11
//chapter 25 Ex 14
clc;
clear;
close;
d=7;    //given diameter
r=d/2;
h=40;   //given height
vol=(22/7)*r^2*h; 
curved_area=2*(22/7)*r*h;
Total_area=(2*(22/7)*r*h)+(2*(22/7)*r^2);
printf("Volume= %d cubic cm\n Curved Surface area= %d square cm\n Total surface area= %d square cm",vol,curved_area,Total_area);