Please help me on Pascal / Delphi. |
尚未結案
|
turbomen
一般會員 ![]() ![]() 發表:5 回覆:4 積分:1 註冊:2009-04-04 發送簡訊給我 |
I want to write a menu driven program that allows a user to set up and run a Game Show. The minimum requirements are a menu system that allows a user to:
1. List all the contestants. The following is my answer in menu system:- Program Student_millionaire; {$APPTYPE CONSOLE} uses SysUtils, OurCrt; Var User_Choice:Integer; Procedure ContestantsList; Begin WriteLn('1 pressed,listing all the contestants...'); ReadLn; End; Procedure Generate10finalists; Begin WriteLn('2 pressed,generating the 10 finalist''s numbers...'); ReadLn; End; Procedure UpdateFinalists; Begin WriteLn('3 pressed,finding and listing the finalists...'); ReadLn; End; Procedure ChangeDetails; Begin WriteLn('4 pressed,changing the phone a friend details...'); ReadLn; End; Procedure EnrolContestant; Begin WriteLn('5 pressed,enroling a new contestant...'); ReadLn; End; Procedure GetOutOfHere; Begin WriteLn('6 pressed,exiting...'); Sleep(1000); End; Begin User_Choice:=0; While User_Choice <> 6 Do Begin ClrScr; WriteLn('Please enter an integer in the range 1...6'); WriteLn; WriteLn(' 1 List all the contestants'); WriteLn(' 2 Generate the 10 finalist''s numbers'); WriteLn(' 3 Find and list the finalists'); WriteLn(' 4 Change the phone a friend details'); WriteLn(' 5 Enrol a new contestant'); WriteLn(' 6 Exit'); WriteLn; ReadLn(User_Choice); Case (User_Choice) of 1:ContestantsList; 2:Generate10finalists; 3:UpdateFinalists; 4:ChangeDetails; 5:EnrolContestant; 6:GetOutOfHere; Else Begin WriteLn('Wrong Number..'); WriteLn('Exiting...'); End; End; End; End. // How can I list all the contestants? |
st33chen
尊榮會員 ![]() ![]() ![]() ![]() ![]() ![]() 發表:15 回覆:591 積分:1201 註冊:2005-09-30 發送簡訊給我 |
|
turbomen
一般會員 ![]() ![]() 發表:5 回覆:4 積分:1 註冊:2009-04-04 發送簡訊給我 |
|
Coffee
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:31 回覆:878 積分:561 註冊:2006-11-15 發送簡訊給我 |
|
turbomen
一般會員 ![]() ![]() 發表:5 回覆:4 積分:1 註冊:2009-04-04 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |