From cc43455c24757472e84cc54971d1579393404987 Mon Sep 17 00:00:00 2001 From: Tapendu <113087288+Tapendu@users.noreply.github.com> Date: Sat, 22 Oct 2022 13:49:22 -0400 Subject: [PATCH] create --- pentarhombus | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 pentarhombus diff --git a/pentarhombus b/pentarhombus new file mode 100644 index 0000000..02aba82 --- /dev/null +++ b/pentarhombus @@ -0,0 +1,52 @@ +#include +#include +int main() +{ + int i, a,j,s=0; + clrscr(); + printf("Enter the number of rows "); + scanf("%d",&a); + s=a/2; + for(int i =0;i<2;i++) + { + for(int i=1;i<=a/2;i++) + { + for(int k=1;k<=s-i;k++) + { + printf(" "); + } + for(int j=1;j<=i;j++) + { + printf("* "); + }for(int k=1;k<=s-i;k++) + { + printf(" "); + } + for(int j=1;j<=i;j++) + { + printf("* "); + } + printf("\n" ); + } +for(int i=1;i<=s;i++) + { + for(int k=0;k=i;j--) + { + printf("* "); + } + for(int k= 0;k=i;j--) + { + printf("* "); + } + printf("\n"); + } + } +}