dekpascal
Baby - C
Thank : 0
ออฟไลน์
กระทู้: 5
|
 |
« ตอบ #1 เมื่อ: ตุลาคม 02, 2011, 02:13:36 pm » |
|
program photo; uses crt; var choice : integer; price,amount,total : longint;
begin clrscr; gotoxy (25,1);writeln('=============================='); gotoxy (30,2);writeln('*** PhotoShop ***'); gotoxy (25,3);writeln('=============================='); gotoxy (25,4);writeln('Choice 1 = 6 Photo 90 Bath'); gotoxy (25,5);writeln('Choice 2 = 12 Photo 120 Bath'); gotoxy (25,6);writeln('Choice 3 = 1 Photo : 50 Bath'); gotoxy (20,8);write('Enter Choice : '); readln(Choice); if choice = 1 then begin gotoxy (20,10);write('Price 6 Photo 90 Bath'); end else if choice = 2 then begin gotoxy (20,11);write('Price 12 Photo 120 Bath'); end else if choice = 3 then begin gotoxy (20,11);write('Enter amount :'); readln(amount); price := amount * 50; gotoxy (20,11);writeln('amount =',price:5); total := amount + price; gotoxy (20,11);writeln('U price =',total:5); end else begin writeln; gotoxy (20,14);writeln('Error , Only Enter 1,2,3, ':34); end; readln; end.
|