summaryrefslogtreecommitdiff
path: root/1553/CH7/EX7.5/7Ex5.sce
blob: 5d1703a726c088d18e3eaf41b748b25d6b685def (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//Chapter 7 Ex5
clc;
clear;
close;
//let numbers be x and y

x=poly(0,'x');
y=x-11;        //equation 1
y=45-x;    //equation 2
for x=1:99
  if x-11 ==45-x
    mprintf("x=%i \n ",x)
    break
  end
end
disp("substitute the x value in any one of the above equationsto find y.");
y=x-11;
printf("\nThus the numbers are %d and %d: \n",x,y);