開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
DEV C++
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
迴圈排列
餵入的資料(Input):
預期的正確結果(Expected Output):
1
12
123
1234
12345
123456
錯誤結果(Wrong Output):
1
12
123
1234
12345
123456
程式碼(Code):(請善用置底文網頁, 記得排版)
int main()
{
int i=1,j=1;
for(i=1;i<=6;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
補充說明(Supplement):
目前錯誤的結果是我程式碼裡面寫的,那怎麼改成正確結果,請高手指導一下,感謝!