From d756d33ade6081fd15fc679810448d47d9ae25ce Mon Sep 17 00:00:00 2001 From: Dipanshu Kumar Rai <74359237+DipanshuKumarRai@users.noreply.github.com> Date: Fri, 1 Oct 2021 15:33:25 +0530 Subject: [PATCH] Half Pyramid.c Half Pyramid for code --- Hacktoberfest 2021/Half Pyramid.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Hacktoberfest 2021/Half Pyramid.c diff --git a/Hacktoberfest 2021/Half Pyramid.c b/Hacktoberfest 2021/Half Pyramid.c new file mode 100644 index 0000000..70a1a94 --- /dev/null +++ b/Hacktoberfest 2021/Half Pyramid.c @@ -0,0 +1,13 @@ +#include +int main() { + int i, j, rows; + printf("Enter the number of rows: "); + scanf("%d", &rows); + for (i = 1; i <= rows; ++i) { + for (j = 1; j <= i; ++j) { + printf("* "); + } + printf("\n"); + } + return 0; +}