求小于20的满足勾股定理的组合(vb)各位高手帮帮忙要考试了谢谢_百度知 ...
发布网友
发布时间:2023-12-22 11:08
我来回答
共2个回答
热心网友
时间:2024-10-14 09:32
for a=1 to 20
for b=1 to 20
for c=1 to 20
if a*a+b*b=c*c then print a & " " & b & " " & c
next
next
next
热心网友
时间:2024-10-14 09:38
<script type="text/vbscript">
for c=1 to 20
for a=1 to 20
for b=1 to 20
p1=b*b+a*a
p2=c*c
if p1=p2 then
document.write(a&b&c&"</br>")
end if
next
next
next
</script>
试一试吧。我不是很确定!
热心网友
时间:2024-10-14 09:34
for a=1 to 20
for b=1 to 20
for c=1 to 20
if a*a+b*b=c*c then print a & " " & b & " " & c
next
next
next
热心网友
时间:2024-10-14 09:31
<script type="text/vbscript">
for c=1 to 20
for a=1 to 20
for b=1 to 20
p1=b*b+a*a
p2=c*c
if p1=p2 then
document.write(a&b&c&"</br>")
end if
next
next
next
</script>
试一试吧。我不是很确定!