-2
#include <iostream>
using namespace std;
// Range of numbers, handles input in which the first number is smaller than the second.
int main()
{
int max = 10;
int min = 0;
while(cin >> min)
{
if(min<max)
{
++min;
cout << "The number inputted is well in the RANGE: " << min << endl;
else
{
cout << "The number inputted is not in the RANGE: " << max << endl;
}
}
} // End of if.
}
這是怎麼回事?爲什麼這不起作用?我是Stack新手,所以我嘗試發佈這個,呃有什麼幫助?錯誤W於else語句/聲明(C++)
怎麼不是這方面的工作?請更精確。 – chris
如果這是你的實際代碼,看看他們不匹配正確的括號(現在,我已經清理您的格式) –