From f6efb1b02ef075b9495dedc39b00e5e212cd9fab Mon Sep 17 00:00:00 2001 From: Aryan-kamboj <90714196+Aryan-kamboj@users.noreply.github.com> Date: Sat, 2 Oct 2021 22:42:13 +0530 Subject: [PATCH] n'th number of line has n stars --- A crazy pyramid program for c.c | 71 +++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 A crazy pyramid program for c.c diff --git a/A crazy pyramid program for c.c b/A crazy pyramid program for c.c new file mode 100644 index 00000000..42c48d25 --- /dev/null +++ b/A crazy pyramid program for c.c @@ -0,0 +1,71 @@ +//n'th number of line has n number of stars; +// * +// * * +// * * * +// * * * * +#include +#include +void main() +{ + int row,col,h; + printf("enter height\n"); + scanf("%d",&h); + if(h%2!=0) + { + for(row=0;row=h-row)&&(col<=h+row) || (col>h-row)&&(colh-row)&&(col