|
CS256 - Fundamentals of Structured Programming
| Displaying exercises/e5/files/h5.c
#include <stdio.h>
#include <stdlib.h>
/**
* Print the prompt "db? " and read a double (a decibel level) from the user
* and using the below list of dB levels print a description of what that dB
* represents, i.e. dB < 10 is "Threshold of Hearing", dB < 100 is "Large
* Orchestra" and anything from 160 and above is "Instant Perforation of
* Eardrum". Hint: Consider using an if-else chain and copy-pasting text from
* the comments.
*
* Description: Decibel:
* Threshold of Hearing 0 dB
* Rustling Leaves 10 dB
* Whisper 20 dB
* Normal Conversation 60 dB
* Busy Street Traffic 70 dB
* Vacuum Cleaner 80 dB
* Large Orchestra 98 dB
* Walkman at Maximum Level 100 dB
* Front Rows of Rock Concert 110 dB
* Threshold of Pain 130 dB
* Military Jet Takeoff 140 dB
* Instant Perforation of Eardrum 160 dB
*/
int main(void)
{
return 0;
}
|