Skip to content
MathsGenie logo
Open app

Course home

  1. GCSE
  2. Computer Science AQA
  3. Question bank

Programming concepts

EasyMediumHard
12345678910111213141516171819202122232425262728293031323334353637
Question 35

A local gaming club is writing a program to calculate a player's final tournament score across three rounds of play.

If a player receives any rules warnings during their matches, their final score is reduced.

Write a C# program to calculate the final tournament score.

You should assume that three integer variables called round1, round2, and round3 have already been declared and assigned values representing the scores of the three individual rounds.

Your program should:

  • Prompt the user to enter the number of rules warnings received and store this in an integer variable.
  • Calculate the total score of the three rounds.
  • Apply the following penalty rules:
    • If exactly one warning was received, the total score is reduced by 15.
    • If more than one warning was received, the total score is halved (divided by 2).
    • Ensure the final total score is never less than 0.
  • Output the final total score with a suitable message.

You should use meaningful variable names and correct C# syntax in your answer.

[7]

Programming concepts Questions

  1. GCSE
  2. /Computer Science
  3. /Programming concepts