TA贡献1936条经验 获得超6个赞
C#:
int result=0;
for(int i=0;i<=100;i++)
rsult+=1/i;
VB:
Dim i as integer=1
Dim result as integer=0
for i to 100
result+=1/i
VB的不怎么记得语法了
TA贡献1982条经验 获得超2个赞
Dim i as integer Dim result as integer=1 For i= 1 To 100 Step 1 result=result+ 1 /i Next Console.WriteLine(result)
举报