x = 0 y = 0 z = 0 limit = 10 while x <= limit do y = 0 while y <= limit do z = 0 while z <= limit do w = x*x + y*y +z*z - x*y*z printf( "( %2d , %2d , %2d ) : %3d\n" , x , y , z , w ) z += 1 end y += 1 end x +=1 end