#include
#include
int main()
{
int rows,cols,i,j;
cout<<"\nEnter the number of rows:";
cin>>rows;
cout<<"\nEnter the number of columns:";
cin>>cols;
for(i=0;i
{for(j=0;j<=i;j++)
{
cout<<"*";
}
cout<<"\n";
}
getch();
}
How do you make a program that asks the user to input a number of rows and columns and prints asterisks according to the input.
For Example:
Enter number of rows: 10
Enter number of columns: 10
The program will then display:
*
**
***
****
*****
******
*******
********
*********
**********