#2255: 解法@@


nanj0178 (nanj)


可是你還是用到LOOP的概念阿@@...

那這個也可以算嚕

 cin >> ntc;

i=1; 

next: 

if(i<=ntc){

     cin >> n;

    sum+=n;

   i++; 

   goto next; 

  cout << sum << endl; 

這應該是for迴圈的原始版本吧... 

#2259: Re:解法@@


morris1028 (碼畜)


可是你還是用到LOOP的概念阿@@...

那這個也可以算嚕

 cin >> ntc;

i=1; 

next: 

if(i<=ntc){

     cin >> n;

    sum+=n;

   i++; 

   goto next; 

  cout << sum << endl; 

這應該是for迴圈的原始版本吧... 

涵式不是LOOP吧 !   (把解答刪掉 ***  唉)

所謂的LOOP概念是怎樣 ?   

#2267: Re:解法@@


nanj0178 (nanj)


可是你還是用到LOOP的概念阿@@...

那這個也可以算嚕

 cin >> ntc;

i=1; 

next: 

if(i<=ntc){

     cin >> n;

    sum+=n;

   i++; 

   goto next; 

  cout << sum << endl; 

這應該是for迴圈的原始版本吧... 

涵式不是LOOP吧 !   (把解答刪掉 ***  唉)

所謂的LOOP概念是怎樣 ?   

我聽人家說 for就是一ㄍif 跟GOTO 而組成的@@......只是for比較好用

我認為遞迴有些時候=for.... 不需要硬是使用遞迴... 雖然比較整潔


#3955: Re:解法@@


Bull (牛牛)


那么用PASCAL怎么办啊