早教吧作业答案频道 -->其他-->
用下面的程序算出60内勾股数组数有哪里不对PrivateSubCommand1Click()DimiAsIntegerDimjAsIntegerDimkAsIntegerDimsumAsIntegerFori=2To60Forj=iTo60k=(i^2+j^2)^0.5Ifk
题目详情
用下面的程序算出60 内勾股数组数有哪里不对
Private Sub Command1_Click()
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim sum As Integer
For i =2 To 60
For j = i To 60
k = (i ^ 2 + j ^ 2) ^ 0.5
If k
Private Sub Command1_Click()
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim sum As Integer
For i =2 To 60
For j = i To 60
k = (i ^ 2 + j ^ 2) ^ 0.5
If k
▼优质解答
答案和解析
你没判断K是否是整数
改成这个
if k
改成这个
if k
看了用下面的程序算出60内勾股数组...的网友还看了以下:
求极限limx→0(2+e^1/x)/[1+e^(2/x)]+x/x求详细解答e^(2/x)为什么 2020-05-13 …
试求算0.2摩尔每立方分米氨水中氢氧根离子的浓度,氢离子浓度,和溶液的ph 2020-05-14 …
(Ⅰ)计算π0+2−2×(94)−12−(0.01)0.5;(Ⅱ)计算2log510+log50. 2020-05-14 …
计算0.2+0.35时可以这样想:0.2里有20个(),0.35里有35个(),合起来是()个0. 2020-05-17 …
电压表的精度表示如下:0.2%rd+0.3fs%,算0.2级还是0.5级?最好附上依据! 2020-06-05 …
δ,σ0.2σeσbσ-1 2020-06-05 …
matlab中位数图像处理clearall;clc;A=imread('abc.jpg');B=r 2020-07-09 …
50增加了80,增加了百分之几?50增加到80,增加了百分之几?计算:0.2*0.4/0.2*0. 2020-07-22 …
计算∫(0,2π)∫(x,2π)(siny/y)dydxπ为圆周率 2020-07-23 …
计算∫[0,2\π]sinxcos^2xdx0是积分下限,2是积分上限 2020-07-31 …