fishmaker.pas
来自「PASCAL光盘资料PASCAL光盘资料PASCAL光盘资料」· PAS 代码 · 共 30 行
PAS
30 行
const n = 100;
t = 1000;
maxf = 1000;
type nodeP = record
fish,delta,time:longint;
end;
var i,j:longint;
Pound:array[1..N] of nodeP;
begin
assign(output,'fishing.in');
rewrite(output);
writeln(n);
randomize;
for i:=1 to n do pound[i].fish:=random(maxf)+1;
for i:=1 to n do pound[i].delta:=random(pound[i].fish div 2)+1;
for i:=2 to n do pound[i].time:=random(t div n);
for i:=1 to n-1 do write(pound[i].fish,' ');
writeln(pound[n].fish);
for i:=1 to n-1 do write(pound[i].delta,' ');
writeln(pound[n].delta);
for i:=2 to n-1 do write(pound[i].time,' ');
writeln(pound[n].time);
writeln(t);
close(output);
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?