From b9e5808ed73ccbe738aeab18ae16f2d97d033cfb Mon Sep 17 00:00:00 2001 From: lilnpuma Date: Thu, 24 Oct 2019 01:14:30 +0530 Subject: [PATCH 1/2] Added solution for p3 iv in C --- p3_iv.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/p3_iv.c b/p3_iv.c index e69de29..4341b4a 100644 --- a/p3_iv.c +++ b/p3_iv.c @@ -0,0 +1,14 @@ +#include +int i,j; +void main() +{ + for (i=1; i < 6; i++) + { + for (j=1; j Date: Tue, 29 Oct 2019 10:50:40 +0530 Subject: [PATCH 2/2] added h1 --- h1.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/h1.c b/h1.c index e69de29..821a474 100644 --- a/h1.c +++ b/h1.c @@ -0,0 +1,34 @@ +#include +int i,j; +void main() +{ + for (i=1; i < 10; i++) + { + for (j=1; j<10; j++) + { + if (i==1 || i==9 || j==1 || j==9) + { + printf("5"); + } + else if (i==2 || i== 8 || j==2 || j==8) + { + printf("4"); + } + else if (i==3 || i== 7 || j==3 || j==7) + { + printf("3"); + } + else if (i==4||i==6||j==4||j==6) + { + printf("2"); + } + else + { + printf("1"); + } + + } + printf("\n"); + + } +} \ No newline at end of file