ช่วยคิดโปรแกรม Caseซ้อนCase ค่ะ คิดไม่ออก55
กระทู้ : 11
คะแนนขอบคุณ : 0
คือว่าเป็นคำสั่ง Caseซ้อนCase ที่ไม่ใช้โปรแกรมคิด เกรดน่ะค่ะ
ขอบคุณล่วงหน้าก่อนนะคะ


บันทึกการเข้า
กระทู้ : 16,996
คะแนนขอบคุณ : 45
มกราคม 20, 2010, 20:15:22
ต้องเพิ่มเติมโปรแกรม Case เอาเองนะครับ เอาโครงมาให้ดูเป็นแนวทางละ
โปรแกรม หาจากไหนได้ ก็ในเว็บนี่แหละครับ
--------------------------------------------------------
โปรแกรม เลือกแบบเมนู หลังใช้โปรแกรมเส็ด มีถามก่อนออก
หลังใช้โปรแกรมเสร็จ จะมีถามก่อนออก หุหุ จะออกก็ต่อเมื่อกด Y โปรแกรมนี้โดนขอมาอีกตามเคย หุหุ
program it4x;
uses crt;
var x,ans:char;
begin
repeat
clrscr;
writeln('Select Choice');
writeln('-------------');
writeln('1.');
writeln('2.');
writeln('3.');
writeln('4.Exit');
write('Please Select Choice = ');readln(x);
clrscr;
case x of
'1' : writeln('1');
'2' : writeln('2');
'3' : writeln('3');
end;
Write('Do you want to Exit (Y/N) = '); readln(ans);
ans:=upcase(ans);
until ans ='Y';
end.

บันทึกการเข้า
กระทู้ : 11
คะแนนขอบคุณ : 0
มกราคม 20, 2010, 21:14:04

บันทึกการเข้า