1樓:聽不清啊
var a:array[1..100]of byte;
n,i,j,k,i1:byte;
begin
readln(n);
for i:=1 to 13 do a[i]:=i;
i:=1; j:=13;
for k:=1 to n-1 do
begin
inc(i);
for i1:=1 to k do
begin
inc(j);
a[j]:=a[i];
inc(i);
end;
end;
if a[i]>10 then
case a[i] of
11:writeln('j');
12:writeln('q');
13:writeln('k');
endelse writeln(a[i]);
end.
2樓:匿名使用者
varst,st1,st2:string;
i,j,n:integer;
begin
st:='a234567890jqk';
readln(n);
writeln;
for i:=1 to n do begin// writeln(st[1]);
if i=n then writeln(st[1]);
st:=copy(st,2,length(st)-1);
for j:=1 to i do beginst1:=copy(st,1,1);
st2:=copy(st,2,length(st)-1);
st:=st2+st1;
end;
if length(st)=0 then break;
end;
writeln;
end.
PASCAL程式設計問題
因為機器上沒有安裝pascal,所以用delphi的控制檯來實現。62616964757a686964616fe78988e69d8331333330346531 var i,j longint r,s,t string temp char begin readln r readln s t s f...
關於PASCAL程式設計的幾道題的答案
第一題不理解,要整條的賣,又買出二分之一條?其他不難,晚點給你答案。4.var i,j,k integer begin for i 1 to 9 do begin k i if i 5 then k 10 i for j 1 to k 1 2 1 do write i writeln end end...
pascal程式設計蝸牛爬井問題。一隻蝸牛在一口深為n英寸的井
var n,u,d integer h,ans integer h是當前的高度,ans就是答案。begin readln n,u,d if u else begin h 0 ans 0 while h h h u ans ans 1 if h h h d ans ans 1 end end writ...