answersLogoWhite

0

#include

#include

void main()

{

int matc=21,x,y;

char ch;

clrscr();

printf(" WELCOME TO THE WORLD OF GAMING \n");

printf("");

printf(" MATCH STICK GAME \n");

printf("/n");

printf("PRESS ANY KET TO KNOW THE RULES \n");

scanf("%c",&ch);

printf("This is a game between user and computer \n There are 21 match sticks user have to pick

1,2,3 or 4 match stick in one turn \n One who pick up the last match stick loose the game \n");

printf(" number above 4 is invalid \n");

printf("if u do this computer automatically wins");

printf("ALL THE BEST \n");

for(int i=1;i<=4;i++)

{

printf("pick up the match sticks 1-4 \n");

scanf("%d",&x);

y=5-x;

printf("i have pick up %d \n",y);

matc=matc-(x+y);

printf("the remaining match stick is %d \n",matc);

if(matc==1x>4)

break;

}

if(matc==1)

{

printf(" your turn pick up the last one \n");

scanf("%d",&x);

printf("you loose");

printf("MUMMY KO BOLO COMPLAIN PILAYE \n");

printf("\t THANKS \n");

}

else

{

printf("you loose because of abiding rules");

getch();

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is a C plus plus game project program?

A C++ game project program could either be a game written in C++ or a C++ library that helps you develop a game.


What is game directory?

All depends on the the game most likely it will be [harddrive]:\Program Files\ [Name of the Company that made it] \ [name of the game] \ Or [harddrive]:\Program Files\ [name of the game] \


Who invented the matchstick?

J.E. Lundstrom invented Matchstick..


Where is the examples folder on game maker 7.0 lite?

C:\Program Files (x86)\Game_Maker7 if you have a windows 7 if you have an older computer it should be in C:\Program Files\Game_Maker7


Is c plus plus can be used in game programming?

yes! why not! this c program is used in ATM servicesand also in games.


When was Matchstick Sun created?

Matchstick Sun was created in 1984.


When was Matchstick Palace created?

Matchstick Palace was created in 1931.


Was the lyric matchstalk men and matchstalk cats and dogs or matchstick men and matchstick cats and dogs?

The lyric was "Matchstick men and Matchstick cats and dogs" based on a painting by a Manchester artist.


How do you make a program of a game by using the C programming language?

Typically you won't use C to write games, particularly non-trivial games. C++ is the language of choice for most game developers.


Three letter name for a matchstick game beginning with the letter n and ending in the letter m?

Nim


How thick is a matchstick?

A matchstick is typically around 2 millimeters thick.


What is the duration of Matchstick Men?

The duration of Matchstick Men is 1.93 hours.