11 lines
432 B
Plaintext
11 lines
432 B
Plaintext
seqn := ListTools:-Reverse([parse(Maplets[Display](Maplets:-Elements:-Maplet(Maplets:-Elements:-InputDialog['ID1']("Enter a sequence of numbers separated by comma", 'onapprove' = Maplets:-Elements:-Shutdown(['ID1']), 'oncancel' = Maplets:-Elements:-Shutdown())))[1])]):
|
|
f:= x -> abs(x)^0.5 + 5*x^3:
|
|
for item in seqn do
|
|
result := f(item):
|
|
if (result > 400) then
|
|
print("Alert: Overflow."):
|
|
else
|
|
print(result):
|
|
end if:
|
|
end do:
|