program Genera_tono_crescente; const nsec = 5; ncamp = nsec * 44100; var i: longint; f: file of integer; conv: double; j: integer; function fun2(x: longint): double; begin fun2:= x / (4.04 * nsec); end; function fun(x: longint): double; begin conv:= (fun2(x)/1115) / (2*pi); fun:= x * conv; end; begin assign(f,'tonoc.raw'); rewrite(f); for i:= 1 to ncamp do begin j:= round(31000 * sin(fun(i)) ); write(f, j); end; close(f); end.