Question: . You're programming a simple environmental monitoring system. This system has a sensor that detects whether the noise level in a particular area exceeds a
You're programming a simple environmental monitoring system. This system has a sensor that detects whether the noise level in a particular area exceeds a certain threshold, indicating a potential noise pollution issue.
Write a program that reads from cin the noise level and prints out whether it exceeds dB a common threshold for noise being potentially harmful. If the threshold is not exceeded, print out "Safe noise level.", otherwise, print "Alert! Noise pollution detected. It is advisable to wear ear plugs."
Sample Run User input inside
Safe noise level.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
