fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int cnt = 0;
  7. while (cnt < 10) {
  8. cout << cnt << " -> Hello, C++." << endl;
  9. cnt++;
  10. }
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5476KB
stdin
Standard input is empty
stdout
0 -> Hello, C++.
1 -> Hello, C++.
2 -> Hello, C++.
3 -> Hello, C++.
4 -> Hello, C++.
5 -> Hello, C++.
6 -> Hello, C++.
7 -> Hello, C++.
8 -> Hello, C++.
9 -> Hello, C++.