← 查看本卷题目GESP C++ 2级2025年12月单选题 第10题 · 2 分与下面C++输出效果不一致的代码是( )。 1 int i;2 for (i = 0; i < 10; i++)3 cout << i;填写答案Acpp int i = 0; while (i < 10){ cout << i; i += 1; } Bcpp int i = 0; while (i < 10){ i += 1; cout << i; } Ccpp int i = 0; while (true){ cout << i; i += 1; if (i >= 10) break; } Dcpp int i = 0; while (true){ if (i >= 10) break; cout << i; i += 1; } 提交答案详细解析这题不会 ← 上一题 第 172 / 405 题← → 键切题 下一题 →
与下面C++输出效果不一致的代码是( )。 1 int i;2 for (i = 0; i < 10; i++)3 cout << i;填写答案Acpp int i = 0; while (i < 10){ cout << i; i += 1; } Bcpp int i = 0; while (i < 10){ i += 1; cout << i; } Ccpp int i = 0; while (true){ cout << i; i += 1; if (i >= 10) break; } Dcpp int i = 0; while (true){ if (i >= 10) break; cout << i; i += 1; } 提交答案详细解析这题不会