From adb56fbe1d47d32a9207989010dda0e52d8be39a Mon Sep 17 00:00:00 2001 From: Avik17 <76001307+Avik17@users.noreply.github.com> Date: Mon, 18 Oct 2021 09:50:23 +0530 Subject: [PATCH] half pyramid pattern added --- half_pyramid.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 half_pyramid.cpp diff --git a/half_pyramid.cpp b/half_pyramid.cpp new file mode 100644 index 0000000..745dda5 --- /dev/null +++ b/half_pyramid.cpp @@ -0,0 +1,19 @@ +#include + +using namespace std; + +int main(){ + int n; + cin>>n; + for (int i = 0; i =0; j--) + { if( j<=i) + cout<<"*"; + else cout<<" "; + } + cout<<"\n"; + } + + return 0; +} \ No newline at end of file