THE PROGRAM DOES SUCCEED BUT, DOES NOT RUN
P/s im using Microsoft visual studio 2010
COMP 120
Homework 5
You want to associate noise loudness measured in decibels with the effect
of the noise. The following table indicates the relationship between
noise level and human perception of noises. Write a C program that inputs
the loudness in decibels and displays the human perception of this loudness.
LOUDNESS IN dbs PERCEPTION
50 or lower quiet
51-70 intrusive
71-90 annoying
91-110 very annoying
Above 110 uncomfortable
// Homework 5.cpp : Defines the entry point for the console application.
//
#include <stdio.h>
#include "stdafx.h"
int
main(void)
{
int noise_db;
int noise_dn;
if (noise_db <= 50)
printf ("%lf" "-decibel noise is quiet /n", &noise_db);
else if(noise_dn <= 70)
printf("%lf""-decibel noise is annoying /n", &noise_db);
else if(noise_db <= 90)
printf ("%lf""-decibel noise is annoying /n", &noise_db);
else
printf("%lf""-decibel noise is uncomfortable /n", &noise_db);
return (0);
}
This post has been edited by jimblumberg: 23 February 2012 - 02:42 PM
Reason for edit:: Added missing Code Tags, Please learn to use them.

New Topic/Question
Reply


MultiQuote




|