{}
run-icon
main.cpp
#include <iostream> using namespace std; int main() { // Loop from 1 to 100 for (int n = 1; n <= 100; n++) { // Print 'n' exactly 'n' times for (int i = 0; i < n; i++) { cout << n << " "; } } cout << endl; // Newline at the end return 0; }
Output