summaryrefslogtreecommitdiff
path: root/1553/CH8/EX8.5/8Ex5.sce
blob: 2832a8a5d6d28c76ff0279bc8803448e57d2776b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//chapter 8 Ex 5

clc;
clear;
close;
//let son's age 8 years ago be x
//by the given condition:  equation is 2(x+16)=4x+16;
mycoeff=[-16 2];
p=poly(mycoeff,"x","coeff");
x=roots(p);
mprintf("Present age of rohit is %d years",4*x+8);