0 like 0 dislike

Please fix the given code below:

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
	
	$1 sticks = 9;
	int taken;
	int Player = 1;
	
	$2(sticks > 0){
		printf("Player %d -- Sticks remaining: %d",Player, sticks);
		printf("\nHow many sticks do you want to take (1-3): ");
		scanf("$3",&taken);
		
		while(taken>3$4taken<1){
			printf("\nHow many sticks do you want to take (1-3): ");
			scanf("%d",&taken);
		}
		sticks -= taken;
		
		Player++;
		
		if(Player==3){
			Player = 1;
		}
		
	}
	
	
	printf("****THE WINNER IS: Player %d !!****", $5);

	return 0;
}

 

 

[Exercise] Fill in the blank - asked in Chapter 3: Branching, Looping and Functions by (5.9k points)
Available when: Unlimited - Due to: Unlimited
| 105 views

17 Answers

0 like 0 dislike
Hidden content!
*
** *
**

**
100/100 answered
edited by
0 like 0 dislike
Hidden content!

** *


* *
100/100 answered by (283 points)
edited by
0 like 0 dislike
Hidden content!

*

%d
** *** *** *
** **
60/100 answered by (269 points)
0 like 0 dislike
Hidden content!
**
* *

%d
**** ******
**
100/100 answered by (271 points)
0 like 0 dislike
Hidden content!

****

%d
** **
** *
80/100 answered by (290 points)
reshown by
0 like 0 dislike
Hidden content!
**
**
**
*
* *
100/100 answered by (252 points)
0 like 0 dislike
Hidden content!

*
*
*
*
100/100 answered by (268 points)
edited by
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.62.64
©2016-2019

Related questions

0 like 0 dislike
18 answers
[Exercise] Multichoice - asked Dec 2, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
Available when: Unlimited - Due to: Unlimited
| 89 views
0 like 0 dislike
14 answers
[Exercise] Essay (Open question) - asked Nov 2, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
Available when: Unlimited - Due to: Unlimited
| 61 views
0 like 0 dislike
22 answers
[Exercise] Coding (C) - asked Dec 30, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
Available when: Unlimited - Due to: Unlimited
| 90 views
8,792 questions
72,362 answers
47,172 comments
2,043 users