summaryrefslogtreecommitdiff
path: root/1553/CH7/EX7.6/7Ex6.sce
blob: 962317f79fd5f5e6deb0d8583820d977233941b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Chapter 7 Ex 6
clc;
close;
//let number be x nad y, then x+y=42 and x*y=437
//absolute differenec is given by:

//sum=x+y;
Sum=42;

//product=x*y;
product=437;

eq=Sum^2-4*product;

//diff=x-y;
Diff=sqrt(eq);
printf("Required difference is: %d",Diff);