勾股定理三个数的关系是,a ^ 2 + b ^ 2 = c ^ 2..编写程序,输出30以内满足上述关系的整数组合.vb编程
问题描述:
勾股定理三个数的关系是,a ^ 2 + b ^ 2 = c ^ 2..编写程序,输出30以内满足上述关系的整数组合.
vb编程
答
Dim a%, b%, c% For a = 1 To 30 For b = 1 To 30 For c = 1 To 30 If c ^ 2 = a ^ 2 + b ^ 2 And a