44Hard
0/7

A research weather station is writing a program to calculate a cumulative atmospheric telemetry reading across three independent sensors.

Due to transient environmental interference, the calculated total reading must be adjusted before being recorded.

Write a VB.NET program to calculate the final corrected telemetry reading.

You should assume there are three integer variables called s1, s2, and s3 which have already been declared and given values representing the raw readings from each of the three sensors.

The program should:

  • Get the user to enter the number of active solar flares and store this integer in a variable
  • Calculate the total reading from the three sensors
    • If exactly one solar flare was active, the total reading is reduced by 40
    • If more than one solar flare was active, the total reading should be reduced to one-third of its value (integer division is acceptable)
    • The final corrected reading must not be less than 0
  • Return/output the final corrected telemetry reading

You should use meaningful variable name(s) and VB.NET 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