From b15d65a18fcf81b413b585ac7554329fbe2254e9 Mon Sep 17 00:00:00 2001 From: SapnaBhardwaj1 Date: Mon, 30 Oct 2017 14:36:20 +0530 Subject: [PATCH 1/5] 32r 3r2r3 --- stick game.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 stick game.c diff --git a/stick game.c b/stick game.c new file mode 100644 index 0000000..2489cb5 --- /dev/null +++ b/stick game.c @@ -0,0 +1,29 @@ +#include +int main (){ + int i,j,k,l; + char c; + printf("Hello there. Welcome. Suppose there are 11 sticks in front of you.You have to pick any number of stics from 1 to 4 (both 1 and 4 included) from 11 stics.Then allow computer to take his chance and choose any number of stics from 1 to 4.The player whose turn comes when 1 stick remains looses or the player who pics the last stick looses...so player how many sticks you chhose\n"); + scanf ("%d",&i); + if(i>=5 || i<=0){ + printf("invalid choice"); + } + else + { + printf ("\nthe number of stick you choose=%d \nsticks remaining =%d\n the computer choose %d\nsticks remaining after first round=%d.\n ...your turn again user ",i,11-i,5-i,6); + + scanf ("%d",&k); + if(k>=5 || k<=0){ + printf("invalid choice"); + } + else + { + printf("\nthe number of stick you choose=%d \nsticks remaining =%d\n the computer choose %d\nsticks remaining after round=%d..YOu LOOSE\n ",k,6-k,5-k,1); + } + + } + + + + +return 0; +} \ No newline at end of file From 81615749750b8cdd7d5a738af92fe7cdd4184eaf Mon Sep 17 00:00:00 2001 From: SapnaBhardwaj1 Date: Mon, 30 Oct 2017 14:37:12 +0530 Subject: [PATCH 2/5] 33 r32 --- *triangle.c | 19 +++++++++++++++++++ countingpyramid.c | 13 +++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 *triangle.c create mode 100644 countingpyramid.c diff --git a/*triangle.c b/*triangle.c new file mode 100644 index 0000000..e203577 --- /dev/null +++ b/*triangle.c @@ -0,0 +1,19 @@ +#include +main () +{ int i,j,k; + for(j=1;j<=5;j++) + { + for(i=1;i<=5;i++) + { + if(j>=i) + { + for(k=1;k<=5;k++) + { + if(i<=k) + printf("*"); + } + printf("\n"); + } + } + } +} diff --git a/countingpyramid.c b/countingpyramid.c new file mode 100644 index 0000000..d20f08a --- /dev/null +++ b/countingpyramid.c @@ -0,0 +1,13 @@ +#include +main() +{ + int i,j; + for(i=1;i<=5;i++) + { + for(j=1;j<=5;j++) + { if(i>=j) + printf("%d",i+j-1); + } + printf("\n"); + } +} From fb3dde28bd0256b748af9ab659efc90f8c48b684 Mon Sep 17 00:00:00 2001 From: SapnaBhardwaj1 Date: Mon, 30 Oct 2017 14:39:22 +0530 Subject: [PATCH 3/5] tq34q3 qt3t3q --- pyramid.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 pyramid.c diff --git a/pyramid.c b/pyramid.c new file mode 100644 index 0000000..c851fcc --- /dev/null +++ b/pyramid.c @@ -0,0 +1,18 @@ +#include +main() +{ + int i,j; + for(i=1;i<=4;i++) + { + for(j=1;j<=4;j++) + { + if(i>j) + { + printf(" "); + } + else + printf("*"); + } + printf("\n"); + } +} \ No newline at end of file From 1d98c95e63018bc174e5a47afe1f81f9c45fb426 Mon Sep 17 00:00:00 2001 From: SapnaBhardwaj1 Date: Mon, 30 Oct 2017 14:39:55 +0530 Subject: [PATCH 4/5] 34 23t From a57b2fd88208d5889840a352f169c666afef5900 Mon Sep 17 00:00:00 2001 From: SapnaBhardwaj1 Date: Mon, 30 Oct 2017 14:40:23 +0530 Subject: [PATCH 5/5] 2q34 35 --- trial.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 trial.c diff --git a/trial.c b/trial.c new file mode 100644 index 0000000..1687035 --- /dev/null +++ b/trial.c @@ -0,0 +1,15 @@ +#include +main() +{ + int a; +int msg(); + +} + + +int msg() + +{ printf("i m a fool"); + return(0); + main(); +} \ No newline at end of file