goto只能在本函数内跳转
#include <iostream>
int main()
{
int i = 1,sum=0;
lable:
sum+=i;
i++;
if(i<=100)
{
goto lable;
}
printf("sum=%d\n",sum);
return 0;
}