رد: Matlab .. assaigment L4 !!
x=0
while x~=4
disp('gemoetry calculator');
disp('1.the area of the circle')
disp('2.the area of the rectangle')
disp('3.the area of the square')
disp('4.quit');
x=input('enter your choice (1-4)');
if x==1
y=input('input the radian=');
c=pi*(y^2);
disp(c)
elseif x==2
y=input('enter the length=');
e=input('enter the width=');
r=y*e;
disp(r)
elseif x==3
y=input('the length=');
s=y^2;
disp(s)
elseif x==4
clc
end
end
|