Computer Science, asked by kr8510831, 3 months ago

write a program in c++ to display the following pattern​

Attachments:

Answers

Answered by kartiksaini0258
1

Answer:#include <iostream>

using namespace std;

int main()

{

   int rows;

   cout << "Enter number of rows: ";

   cin >> rows;

   for(int i = 1; i <= rows; ++i)

   {

       for(int j = 1; j <= i; ++j)

       {

           cout << j << " ";

       }

       cout << "\n";

   }

   return 0;

}

Explanation:

it's working or not ?? is this program ok ..?

Similar questions