Tugas Matlab (Hafizh Ghazidin 2413100100)

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

0 komentar:

Posting Komentar