28Hard
0/7

An environmental monitoring station uses a program to analyze noise pollution by summing the decibel levels from three sensors.

Due to weather interference, the recorded total noise level must be adjusted depending on wind conditions.

Write a C# program to calculate the final adjusted noise level.

You should assume that three integer variables called reading1, reading2, and reading3 have already been declared and assigned values representing the individual sensor readings.

Your program should:

  • Prompt the user to enter the wind interference level and store this in an integer variable.
  • Calculate the total noise level of the three sensor readings.
  • Apply the following adjustment rules:
    • If the wind interference level is exactly 2, the total noise level is reduced by 20.
    • If the wind interference level is greater than 2, the total noise level is divided by 4 (using integer division).
    • Ensure the final adjusted total noise level is never less than 5.
  • Output the final total noise level with a suitable, descriptive message.

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

[7]

Programming concepts Questions

Practise AQA GCSE Computer Science Programming concepts with exam-style questions for GCSE Computer Science. 100 questions, matched to the AQA GCSE Computer Science (8525) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.

PreviousNext

Programming concepts Questions

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