1樓:匿名使用者
第一題:
varmax,min,i,data:longint;
beginmax:=-maxlongint;
min:=maxlongint;
for i:=1 to 10 do
beginread(data);
if data>max then
max:=data;
if datamin:=data;
end;writeln(max);
writeln(min);
end.第二題:
vari:char;
beginfor i:='a' to 'z' do
write(i);
writeln;
end.//對了,你是剛剛入門的吧~
2樓:匿名使用者
var i,j,n,m,t:longint;
a:array[1..10] of longint;
beginfor i:=1 to 10 do
read(a[i]);
for i:=1 to 9 do
for j:=i+1 to 10 do
if a[i]then
begint:=a[j];
a[j]:=a[i];
a[i]:=t;
end;write(a[1],'a[10]);
end.或var i,j,n,m,t:longint;
a:array[1..10] of longint;
beginfor i:=1 to 10 do
read(a[i]);
for i:=1 to 9 do
for j:=i+1 to 10 do
if a[i]then
begint:=a[j];
a[j]:=a[i];
a[i]:=t;
end;writeln(a[1]);
write(a[10]);
輸出時字母大寫)
var i,j:longint;
a:array[1..100] of real;
beginfor i:=1 to 26 do
for j:=65 to 90 do
a[i]:=ord(j);
for i:=1 to 26 do write(a[i],'
end.(輸出時字母小寫)
var i,j:longint;
a:array[1..100] of real;
beginfor i:=1 to 26 do
for j:=97 to 122 do
a[i]:=ord(j);
for i:=1 to 26 do write(a[i],'
end.
3樓:
改為 read(a[i]) 較好讀完後加上 readln
2.最好不要用字元作為迴圈變數。
改成 for i:=1 to 26 do
write(asc(i+64));
writeln;
高手幫忙!pascal語言奇解,高手幫忙!pascal語言奇解。
varch char i,n longint num array 1.100 of longint begin for i 1 to n do begin read num i write end read ch if ch then halt end.希望這個回答對你有幫助!放一個tedit控制元...
急求高手解答程式設計C語言題目如下
答案是 include int main void printf n 這個程式完全正確,希望你滿意,我給加了註釋,你注意看 很平常。include main void main x m 12 printf d n x for i 1000 i 9999 i a i 10 b i 10 10 prin...
求Pascal高手指點八皇后問題
太複雜了。program hh const n 8 var i,j,k integer x array 1.n of integer function place k integer boolean var i integer begin place true for i 1 to k 1 do i...