summaryrefslogtreecommitdiff
path: root/1553/CH24/EX24.13/24Ex13.sce
blob: 35be8c2eaf4899b4bb41bb73c1427888c5b238e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Chapter 24 Ex 13

clc;
clear;
close;
inc=3; dec=4;
x=poly(0,'x');
y=(x-7);   //from given condition 1
y=(3*x-12)/4;   //from given condition 2
for x=1:99
    if (x-7)==((3*x-12)/4) then
        break;
    end
end
y=x-7;
area=2*(x+y);
mprintf("The perimeter of the rectangle is %d cm.",area);