From d015ad6ce873619ce25802483922378fb14acf97 Mon Sep 17 00:00:00 2001 From: Komal Gupta Date: Tue, 25 May 2021 12:47:45 +0530 Subject: [PATCH 1/2] Create Z_pattern.cpp --- patterns/Z_pattern.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 patterns/Z_pattern.cpp diff --git a/patterns/Z_pattern.cpp b/patterns/Z_pattern.cpp new file mode 100644 index 0000000..ffadd35 --- /dev/null +++ b/patterns/Z_pattern.cpp @@ -0,0 +1,25 @@ +/* + enter the no of rows:5 +***** + * + * +* +***** */ +#include +void main() +{ + int i,j,row; + printf("\n enter the no of rows:"); + scanf("%d",&row); + for( i=1;i<=row;i++) + { + for( j=1;j<=row;j++) + { + if(i==1 || i==row||i+j==row||i+j==row) + printf("*"); + else + printf(" "); + } + printf("\n"); + } +} From 380a75d3e144dc1198a256a9e7664927057c6251 Mon Sep 17 00:00:00 2001 From: Komal Gupta Date: Tue, 25 May 2021 13:42:16 +0530 Subject: [PATCH 2/2] Rename Z_pattern.cpp to Z_pattern.c --- patterns/{Z_pattern.cpp => Z_pattern.c} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename patterns/{Z_pattern.cpp => Z_pattern.c} (100%) diff --git a/patterns/Z_pattern.cpp b/patterns/Z_pattern.c similarity index 100% rename from patterns/Z_pattern.cpp rename to patterns/Z_pattern.c