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的不怎么记得语法了
Dim i as integer
Dim result as integer=1
For i= 1 To 100 Step 1
result=result+ 1 /i
Next
Console.WriteLine(result)
Code