转载的老师发的答案,关注我,随时更新答案,如果来不及了,可以私信我,我发给你们相应的答案
#include <iostream>
using namespace std;
int main()
{
for (int counter = 1;counter <= 10;++counter)
{
if (counter != 5)
{
cout << counter << " ";
}
}
cout << endl << "Skipped printing 5 without continue" << endl;
return 0;
}
下面是运行结果: