Вбейте в паскаль или турбо паскаль , проверьте пж. program ideone;

function ctg(x: extended):extended;

begin

ctg := cos(x)/sin(x);

end;

var i, count : integer;

x : extended;

begin

count := 0;

x := 1;

for i:=0 to 2018 do begin

if ctg(x)<0 then Inc(count);

x := x * 10;

end;

WriteLn(count)

end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Copyright © 2024 SCHOLAR.TIPS - All rights reserved.