小编Але*_*чин的帖子

浮点运算总和不动

嗯,好的坏的和丑的
为什么round(cargof)留在那里2

uses crt;

type 
    trail_type = (blue ,desert ,white);
    fruit_class = (none ,apple ,pineapple);
type
    ontherun = Record
    trail : trail_type;
    cargo : Integer;
    miles : Integer;
end;
Var 
    b : File of ontherun;
    rec : ontherun;
    rec_b : array[1..3] of ontherun;
    k , cargo , load , xload , miles , run : Integer;
    cargof  : Double;
    fruit : fruit_class;

begin
        cargof := 0;
        Repeat
            cargof := 0.04*cargof + 2.0;
            Writeln(round(cargof)); 
        Until cargof > …
Run Code Online (Sandbox Code Playgroud)

pascal freepascal

-1
推荐指数
1
解决办法
62
查看次数

标签 统计

freepascal ×1

pascal ×1