Actual required program: (I'm very close here)Code:#include <stdio.h> #include <stdlib.h> int main() { unsigned int x=10; unsigned int j; int axe; while(x<=10) { printf("\nEnter 1 or 2"); scanf("%d",&axe); if(axe>2) { printf(" Sorry only 1 or 2 allowed"); } else{ x=x-axe; for ( j = 1; j <= x; ++j ) printf( "%s", "O" ); if(x==0) { printf("The last player won!!"); exit(0); } } } } // Please anyone can help me complete the bold marked points in this program as mentioned below in the description to complete this program, I'd be really very grateful!!
Game Description:
This is a number game based on logic and strategy.
The game is designed for two players.
The goal of this game is to be the player who pops the last of ten balloons from the computer screen.
A player can pop one or two balloons during his/her turn.
The player who pops the last balloon WINS.
Game Specifications:
The player who pops the last balloon is the winner of the game.
- Display the winner of the game with an appropriate message.
- Also display the number of balloons popped by each player.
- The game description must be provided to the players.
- The names for each player must be accepted from the players/user.
- Each player must be addressed by his/her name.
- The user must select the player who starts the game.
- The balloons must be displayed to the players/user.
- The first player must be given the option to pop 1 or 2 balloons.
- The updated list of balloons must be displayed to the user.
- Then the second player must be given the option to pop 1 or 2 balloons.
- The updated list of balloons must be displayed to the user.
- This must continue till all the balloons from the computer screen are popped.



LinkBack URL
About LinkBacks





