-3
所以我得到這個代碼:爲什麼我的C++應用程序不能生成我期望的輸出?
#include "stdafx.h"
#include "iostream"
using namespace std;
int main()
{
int counter=1;
char letter='i';
while (letter <= 'g')
{ cout << letter << " ";
if (counter % 10 == 0)
cout << endl;
}
letter++;
counter++;
system("pause");
return 0;
}
一旦我運行它,它給了我這樣的:
應該給我的信一環,而是它給我什麼。我不知道爲什麼。你們能幫忙嗎?提前致謝。
如果您正確縮進代碼,則可能會看到問題。 –