這當又怎樣理解?
int sum(int a1, int b2)
{
int i=1, temp=100, total=0;
if(a1<b2){
temp=b2;
b2=a1;
a1=temp;
}
for(i=a1;i<=b2;i++)
total += i;
return total;
}
我邏輯要怎樣理解??
int sum(int a1, int b2)
{
int i=1, temp=100, total=0;
if(a1<b2){
temp=b2;
b2=a1;
a1=temp;
}
for(i=a1;i<=b2;i++)
total += i;
return total;
}
我邏輯要怎樣理解??

努力學習C