Structured programming and subroutines (procedures and functions)

EasyMediumHard
1234567891011121314
Question 6
Hard

Using VB.NET, write a function to help a chemical plant operator analyze hourly pressure records for an industrial reactor.

The function must:

  • have the identifier countCriticalPressures
  • take the number of hours to analyze as an integer parameter
  • prompt the user to input the maximum recorded pressure (as an integer in kPa) for each of those hours
  • count how many of those hours the pressure was strictly greater than 150 kPa
  • return that count.

You should use meaningful variable name(s) and VB.NET syntax in your answer.

[6]

Structured programming and subroutines (procedures and functions) Questions

  1. GCSE
  2. /Computer Science
  3. /Structured programming and subroutines (procedures and functions)