13 lines
341 B
Text
13 lines
341 B
Text
scope # TPK algorithm in Agena
|
|
local y;
|
|
local a := [];
|
|
local f := proc( t :: number ) is return sqrt(abs(t))+5*t*t*t end;
|
|
for i from 0 to 10 do a[i] := tonumber( io.read() ) od;
|
|
for i from 10 to 0 by - 1 do
|
|
y:=f(a[i]);
|
|
if y > 400
|
|
then print( "TOO LARGE" )
|
|
else printf( "%10.4f\n", y )
|
|
fi
|
|
od
|
|
epocs
|