Created
June 19, 2020 08:47
-
-
Save 2hanX/dca23b2711c1c308bd9a19ae33e1688d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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