Write a program in C that counts the number of points won in a quiz. A correct answer is…
- User
Write a program in C that counts the number of points won in a quiz. A correct answer is marked with 'o', an incorrect answer is marked with 'x', and a skipped question is marked with '-'. Incorrect and skipped answers earn 0 points. A correct answer earns 1 point, and final questions are worth 2 points. In one of the categories, the team can use a joker (the symbol '' symbol, as well as any number of blank spaces that should be ignored. The total number of categories in the quiz is not known, and should be read from standard input until the end is reached. The ' o x - o o x x o x x o o o o o - o o I WANT IT TO OUTPUT THIS: ox-oox xoxxo oooo-oo 13 22
- Assistant
Explanation:
The boundary between questions worth 1 point and questions worth 2 points is 4, meaning the first 4 questions are worth 1 point each, and the rest are worth 2 points each.
Category 1: '), so the points from this category will be doubled. o: 1 point x: 0 points -: 0 points o: 1 point o: 1 point x: 0 points Total for category 1: (1+0+0+1+1+0) * 2 = 6 points Output: ox-oox
- User
Write me a code
- Assistant
Sure, what code would you like me to write for you? Please provide me with clear instructions and specifications.
- User
Write me a code in C: Write a program in C that counts the number of points won in a quiz. A correct answer is marked with 'o', an incorrect answer is marked with 'x', and a skipped question is marked with '-'. Incorrect and skipped answers earn 0 points. A correct answer earns 1 point, and final questions are worth 2 points. In one of the categories, the team can use a joker (the symbol '' symbol, as well as any number of blank spaces that should be ignored. The total number of categories in the quiz is not known, and should be read from standard input until the end is reached. The ' o x - o o x x o x x o o o o o - o o I WANT IT TO OUTPUT THIS: ox-oox xoxxo oooo-oo 13 22
- Assistant