Skip to content

Instantly share code, notes, and snippets.

@2hanX
Created June 19, 2020 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 2hanX/dca23b2711c1c308bd9a19ae33e1688d to your computer and use it in GitHub Desktop.
Save 2hanX/dca23b2711c1c308bd9a19ae33e1688d to your computer and use it in GitHub Desktop.
#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 k = 1; k <= rows-i; k++)
cout << '.';
for (int j = 1; j <= i; j++)
cout << '*';
cout << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment