Uses wincrt;
Var ans, d:string;
layers, a,b,c :integer;
begin
Writeln('Welcome to this DYING Game! THMSS''s Hall welcome you!');
Writeln('Today is 9/1, F.4 Science student test CIT(A).');
Writeln('Art student test CIT(D), C.HISTand C.LIT');
Writeln('All the subjects have the three words ''CIT''!!!');
repeat
write('Have you die in your exam? (Y/N) '); readln(ans);
if ans<>'Y' then
writeln('No, you must answer yes!!!');
until ans = 'Y' ;
d:= 'DIE';
Write('How many layers do you want?');
Readln(layers);
For a := 1 to layers do
For b := 1 to 2+a do
Begin
Write('':layers+2-b);
For c := 1 to 2*b-1 do
Write(d);
Writeln;
End;
For a := 1 to layers+1 do
Begin
Write('':layers + 2 - (layers+1) div 2);
for b := 1 to ((layers+1) div 2)*2-1 do
Write(d);
Writeln;
End;
writeln('Oh! You have a ',layers,' layers die tree!');
end.
理科同學可以把code copy 落turbo pascal 內看...
文科同學可以叫我send 個programme 比你....多謝合作XD
特別鳴謝盧忻喆同學的聖誕樹code....因我唔識整-3-
唔好告我侵犯版權呀-口-
|