Re: [問題] 請教程式的執行順序

看板C_and_CPP作者 (遊心)時間12年前 (2013/05/24 13:16), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/3 (看更多)
: #include <stdio.h> : int f(int a){printf("*");return a+1;} 因為是loop 所以用橫向代表時間 : int main() : { : int a=1; init iter1 iter2 iter3 : for (a=a+1;f(a)<5;a+=1) a=2 f(2)=3<5 f(3)=4<5 f(4)=5==5 loop結束 printf("*"); printf("*"); printf("*"); : { : printf("*"); printf("*"); printf("*"); : } : return 0; : } 一共printf五次 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.167.129 ※ 編輯: tou500900 來自: 140.113.167.129 (05/24 22:03)

05/25 01:02, , 1F
05/25 01:02, 1F
文章代碼(AID): #1HdsWMhH (C_and_CPP)
文章代碼(AID): #1HdsWMhH (C_and_CPP)