Expected Output :
1
12
123
1234
12345
123456
1234567
12345678
123456789
12345678910
1 Replies
#include <iostream>
using namespace std;
int main()
{
int i,j,rows;
cout << "\n\n Display the pattern using number starting from 1:\n";
cout << "------------------------------------------------------\n";
cout << " Input number of rows: ";
cin >> rows;
for(i=1;i<=rows;i++)
{
for(j=1;j<=i;j++)
cout<<j;
cout<<endl;
}
}