用三种循环语句分别编写程序显示1~100的平方值 在线等急

2025-04-18 18:25:55
推荐回答(1个)
回答1:

1
for i=1 to 100
print i^2;
if i mod 10 =0 then print
next
2
i=1
while i<=100
print i^2;
if i mod 10 = 0 then print
i=i+1
wend
3
i=1
do whlie i<=100
print i^2;
if i mod 10 = 0 then print
i=i+1
loop