Ask HN: Anyone knows how to write this code in Pascal?
I have a piede of python code and I would like to know how this would be written in Pascal (it’s for historical research reasons).
I tried to look it up but I couldn’t figure it out for the life of me.
Here’s the python code:
for i in range(116000): x = i y = (x*4)/2.71 print(x, y)
Thanks (and sorry for the weird Ask HN :) )
8 comments
[ 2.4 ms ] story [ 17.1 ms ] threadGah formatting is horrible ... [EDIT] here is a gist: https://gist.github.com/tonetheman/db1c3d3cc8a63a0498ed3b165...
program TestMe; var i : Longint; x : Longint = 0; y : Real = 0; begin
end.Alternate version using while:
end.
Program test(output); var i,x:integer; y:real; begin for i:=1 to 10 do begin x:=i; y:=(x*4)/2.71; writeln(x,y); end;
end.