CJCoding With Joseph
15per day
← Back to Question List

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics:
C++ Quiz #9

For Loop Count

easyLoops

What is the output of this code?

📄 Code

1#include <iostream>
2using namespace std;
3 
4int main() {
5 int count = 0;
6 for (int i = 0; i < 5; i++) {
7 count += i;
8 }
9 cout << count << endl;
10 return 0;
11}