又给你改过了。这下可以了么?可以了记得加分!
program ssy;
var
m,n,j,i,k,x:longint;
begin
read(m,n);
j:=1;
repeat
j:=j2;k:=0;
for i:=m to n do if i mod j=0 then begin write(i,' '); inc(k);x:=i;end;
writeln;
until k<=1;
writeln(x);//最后剩下就是x
end
{下面是源程序,我输出的是每一次的剩下的数,最后一行就是最后剩下来的数。
加分哦!!
var
a:set of byte;
m,n:longint;
procedure init;//输入
begin
read(m,n);
a:=[mn];
end;
procedure main;
var i,j:longint;
begin
for i:=m to n do if i mod 2=1 then a:=a-[i]
else write(i,' ');
writeln;
j:=2;
while a<>[] do
begin
j:=j2;
for i:=m to n do if not(i mod j=0)then a:=a-[i]
else write(i,' ');
writeln;
end;
end;
begin
init;
main;
end}
晕!!
1
program hsdj;
var
i,j,n:longint;
money:real;
begin
read(n);money:=0;
if n<=50 then money:=n015;
if n>50 then money:=n015+(n-50)01;
writeln(money:0:3);
end
2
program hjds;
var
n:longint;
cost:real;
begin
read(n);
if n<50 then cost:=50;
if (n>=50) and (n<100) then cost:=n09;
if n>=100 then cost:=100+(n-100)08;
writeln(cost:0:3);
end
3rogram sdhj;
var
a:array[13] of longint;
i,j,t:longint;
begin
for i:=1 to 3 do read(a[i]);
for i:=1 to 2 do
for j:=i+1 to 3 do
if a[i]>a[j] then begin t:=a[i];a[i]:=a[j];a[j]:=t;end;
for i:=1 to 3 do write(a[i],' ');writeln;
end
13
program shdj;
var
n:longint;
begin
read(n);
n:=n div 10;
if n<6 then writeln('bu he ge');
if n=6 then writeln('he ge');
if (n=7) or (n=8) then writeln('liang hao');
if (n=9) or (n=10) then writeln('you xiu');
end
var
a:integer;
t:boolean;
begin
a:=0;
t:=true;
while t do begin
a:=a+1;
if (a mod 2=1) and (a mod 3=1) and (a mod 4=1) and (a mod 5=1) and (a mod 6=1) and (a mod 7=0) then t:=false;
end;
writeln(a);
end
以上就是关于编PASCAL程序全部的内容,包括:编PASCAL程序、pascal编程、pascal程序编写等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)