From d5a3b99c3f1c6f0bf50c22e4cb48d88cbc0bd981 Mon Sep 17 00:00:00 2001 From: deepanshu1201 <72185497+deepanshu1201@users.noreply.github.com> Date: Mon, 31 Oct 2022 09:41:58 +0530 Subject: [PATCH 1/2] Add files via upload --- C/pyramid in c ++.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 C/pyramid in c ++.cpp diff --git a/C/pyramid in c ++.cpp b/C/pyramid in c ++.cpp new file mode 100644 index 0000000..62f1ec7 --- /dev/null +++ b/C/pyramid in c ++.cpp @@ -0,0 +1,23 @@ +#include +using namespace std; +int main() +{ + int i, space, rowSize, k=0; + cout<<"Enter the Number of Rows: "; + cin>>rowSize; + cout<<"\nPyramid of "< Date: Mon, 31 Oct 2022 09:53:38 +0530 Subject: [PATCH 2/2] Add files via upload --- Python/pyramid in python.ipynb | 1 + 1 file changed, 1 insertion(+) create mode 100644 Python/pyramid in python.ipynb diff --git a/Python/pyramid in python.ipynb b/Python/pyramid in python.ipynb new file mode 100644 index 0000000..c17209e --- /dev/null +++ b/Python/pyramid in python.ipynb @@ -0,0 +1 @@ +{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[{"file_id":"1tPR3Sk9QGwlz_wQbidmFQExlUt_dMQjC","timestamp":1665548998733}],"collapsed_sections":[],"authorship_tag":"ABX9TyP+lNo9nBfWQqm6ERJRNpkg"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"2Xbeagmsa_7N","executionInfo":{"status":"ok","timestamp":1665548965475,"user_tz":-330,"elapsed":3354,"user":{"displayName":"Deepanshu Khandelwal","userId":"08509642947675263646"}},"outputId":"5c011128-f4bf-4185-edc6-dfd35af1874a"},"outputs":[{"output_type":"stream","name":"stdout","text":["Enter number of rows: 9\n"," * \n"," * * * \n"," * * * * * \n"," * * * * * * * \n"," * * * * * * * * * \n"," * * * * * * * * * * * \n"," * * * * * * * * * * * * * \n"," * * * * * * * * * * * * * * * \n","* * * * * * * * * * * * * * * * * \n"]}],"source":["rows = int(input(\"Enter number of rows: \"))\n","\n","k = 0\n","\n","for i in range(1, rows+1):\n"," for space in range(1, (rows-i)+1):\n"," print(end=\" \")\n"," \n"," while k!=(2*i-1):\n"," print(\"* \", end=\"\")\n"," k += 1\n"," \n"," k = 0\n"," print()"]}]} \ No newline at end of file