matalb
actamt=0; tax=0.12; totalamt=0; price=0; choice=1;
while(choice==1)
display('Welcome to CCD');
display('MENU');
display('Press 1. For Frappe Rs 100');
display('Press 2. For Lemonade Rs 110');
display('Press 3. For Iced Tea Rs 120');
display('Press 4. For Cappachino Rs 130');
display('Press 5. For Mint Tea Rs 140');
n = input('\n Enter you Choice >> ');
switch n
case (1)
display(' Frappe Rs 100 ');
price=100;
case (2)
display(' Lemonade Rs 110 ');
price=110;
case (3)
display(' Iced Tea Rs 120 ');
price=120;
case (4)
display(' Cappachino Rs 130 ');
price=130;
case (5)
display(' Mint Tea Rs 140 ');
price=140;
otherwise
display('Wrong Choice');
end
display(' Price = ');
display(price);
actamt=actamt+price;
display(actamt);
choice=input('Want to order more ? Press 1 for yes 2 for no ');
end
display('Tax = ');
display(actamt*tax);
totalamt= actamt + actamt*tax;
display(totalamt);
http://factorial.tdnenterprises.cloudbees.net/
while(choice==1)
display('Welcome to CCD');
display('MENU');
display('Press 1. For Frappe Rs 100');
display('Press 2. For Lemonade Rs 110');
display('Press 3. For Iced Tea Rs 120');
display('Press 4. For Cappachino Rs 130');
display('Press 5. For Mint Tea Rs 140');
n = input('\n Enter you Choice >> ');
switch n
case (1)
display(' Frappe Rs 100 ');
price=100;
case (2)
display(' Lemonade Rs 110 ');
price=110;
case (3)
display(' Iced Tea Rs 120 ');
price=120;
case (4)
display(' Cappachino Rs 130 ');
price=130;
case (5)
display(' Mint Tea Rs 140 ');
price=140;
otherwise
display('Wrong Choice');
end
display(' Price = ');
display(price);
actamt=actamt+price;
display(actamt);
choice=input('Want to order more ? Press 1 for yes 2 for no ');
end
display('Tax = ');
display(actamt*tax);
totalamt= actamt + actamt*tax;
display(totalamt);
http://factorial.tdnenterprises.cloudbees.net/
Comments