1234567
for(int r=1;r<=5;r++){ for(int c=1;c<=r;++c){ cout<<c; } cout<<endl;
1 12 123 1234 12345
123456789101112131415161718192021
//Output.cpp //## #include <iostream> using std::cout; using std::endl; int main(){ for(int r=1;r<=5;r++){ for(int c=1;c<=r;++c){ cout<<c; }//end inner for loop cout<<endl; }//end outer for loop return 0; //indicates success }//end main