From 57d5e074df43db28be0152661ad7ffbe8725a7d4 Mon Sep 17 00:00:00 2001 From: avinashluhana Date: Sun, 17 Oct 2021 16:35:42 +0500 Subject: [PATCH] C++ Programs To Create Pyramid and Pattern --- pramid.cpp.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pramid.cpp.txt diff --git a/pramid.cpp.txt b/pramid.cpp.txt new file mode 100644 index 0000000..1017c72 --- /dev/null +++ b/pramid.cpp.txt @@ -0,0 +1,20 @@ +#include +using namespace std; + +int main() +{ + int rows; + + cout << "Enter number of rows: "; + cin >> rows; + + for(int i = 1; i <= rows; ++i) + { + for(int j = 1; j <= i; ++j) + { + cout << "* "; + } + cout << "\n"; + } + return 0; +} \ No newline at end of file