Tugas Matlab (Hafizh Ghazidin 2413100100)
Diposting oleh
TIK C122
Minggu, 23 Maret 2014
x=1
while x==1
y=menu('kalkulator','+','-','*','/')
switch y
case 1
a=input('a= ');
b=input('b= ');
c=a+b;
disp(c);
case 2
a=input('a= ');
b=input('b= ');
c=a-b;
disp(c);
case 3
a=input('a= ');
b=input('b= ');
c=a*b;
disp(c);
case 4
a=input('a= ');
b=input('b= ');
c=a/b;
disp(c);
end
x=menu('coba lagi','ya','tidak')
end
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar