From a1e962853a3e517186b5c686afa80a6bfbefa1cb Mon Sep 17 00:00:00 2001 From: Ujwal Gulhane <72155234+Ujwalgulhane@users.noreply.github.com> Date: Wed, 13 Oct 2021 13:27:40 +0530 Subject: [PATCH] program is optimal add comment for understand code --- Pattern/Pattern_Pyramid180.cpp | 41 +++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/Pattern/Pattern_Pyramid180.cpp b/Pattern/Pattern_Pyramid180.cpp index ec7b00e..85c13c3 100644 --- a/Pattern/Pattern_Pyramid180.cpp +++ b/Pattern/Pattern_Pyramid180.cpp @@ -1,16 +1,31 @@ -#include +// C++ code to demonstrate star pattern +#include using namespace std; -int main(){ - cout<<"NO OF ROWS:"; - int n; - cin>>n; - for(int i=1;i<=n;i++){ - for(int j=1;j<=i;j++){ - cout<<"* "; - } - cout<