In math class, we were given an extra credit problem on our test, asking what positive integers will never fit the form of a^2+b^2=c^2 where a, b, and c are integral.
I wrote a program to solve it
my code was as follows:
Define xc()= Prgm Local a While a<100 //I took a guess and said that if one leg is 2, the other will be less then 100 Disp a^2+2^2 Disp a EndWhile EndPrgm
I watched as the numbers scolled through, and attempted to see if there were 2 ints in a row. It worked, but I was hoping if anyone knew of a way to include an if statement with something that returned the number a was at, and the answer only when it was an int.
A continuation of this would be to do
Define xc()= Prgm Local a local b While b<100 While a<100 Disp sqrt(a^2+b^2) Disp a EndWhile EndWhile EndPrgm
while checking for ints.