Hi,
A solution for a TI-92 function (without a loop):
evensq(n)
Func
If ceiling( sqrt(n) )/2 ~= floor( ceiling( sqrt(n) )/2 ) Then
Return ( ceiling( sqrt(n) ) + 1 )^2
Else
Return ( ceiling( sqrt(n) ) )^2
EndIf
EndFunc
Note: sqrt : square root
~= : not equal
Regards
Jakob Aabel Østergaard
Project Engineer, M.Sc.E.E.
RTX Telecom A/S
Stroemmen 6
DK-9400 Noerresundby
Phone: +45 96322427
Fax: +45 96322310
-----Original Message-----
From: tfobrien [SMTP:tfobrien@mindspring.com]
Sent: 24. May 2000 02:02
To: ti-math@lists.ticalc.org
Subject: TI-M: Even Square
Lets say someone enters a number N. How do you find the next even perfect
sqyare after that(using the calulator basic)? If N were 8, the next even
square would be 16. Somebody mentioned a loop.