搜题
问题   更新时间2023/4/3 12:59:00

编写程序:求出1000以内所有能被7整除的数,并求出这些数之和、这些数的个数。
S=0
T=0
For i=1 to 999
If mod(i, 7)=0
S=s+i
T=t+1
Endif
Endfor
? “1000以内能被7整除的数之和为:”, s, “个数为:”, t

S=0 T=0 For i=1 to 999 If mod(i, 7)=0 S=s+i T=t+1 Endif Endfor ? “1000以内能被7整除的数之和为:”, s, “个数为:”, t
王老师:19139051760(拨打)