23 lines
356 B
Plaintext
23 lines
356 B
Plaintext
sub f(n)
|
|
return sqr(abs(n)) + 5.0 * n ^ 3.0
|
|
end sub
|
|
|
|
dim s(11)
|
|
print "enter 11 numbers"
|
|
for i = 0 to 10
|
|
print i, " => ";
|
|
input "" s(i)
|
|
next i
|
|
|
|
print "\n--------------------"
|
|
for i = 10 to 0 step -1
|
|
print "f(", s(i), ") = ";
|
|
x = f(s(i))
|
|
if x > 400 then
|
|
print "--- too large ---"
|
|
else
|
|
print x
|
|
endif
|
|
next i
|
|
end
|