summaryrefslogtreecommitdiff
path: root/1553/CH25/EX25.3/25Ex3.sce
blob: 49c721c72e28ba1462d442a3b7e51c957d723ce4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//Ch25_Ex3
clc;
clear;
close;
volume=12.8;      //Given
x=poly(3,"x");
40*x*5*x*x==12.8;    //volume=l*b*h and l=40*x, h=5*x, b=x

//polynomial is 200*x^3-12.8=0;
//let s=x^3
s=12.8/200;
s=nthroot(s,3);

b=s*100;    //converting meter into centimeter
printf("The breadth is: %d cm",b);