VB6.0程序这么写

来源:百度知道 编辑:UC知道 时间:2024/05/13 03:33:15
x*x+y*y+z*z=2000,的非负解.
这个程序这么编????
写具体点,最后打印印桌面上(prin x;y;z)!!!

<%
for x=0 to sqr(2000)
for y=0 to sqr(2000)
for z=0 to sqr(2000)
if(x*x+y*y+z*z)=2000 then
response.Write("x="&x&",y="&y&",z="&z&"<br>")
end if
next
next
next
%>

最笨的方法
for(x=0;x<sqrt(2000),x++)