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

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