98 858
Assignments Done
98.6%
Successfully Done
In April 2021

# Answer to Question #51271 in C for christian francis del mundo

Question #51271
The national earthquake information center has the following criteria to determine the earthquake’s damage. Here are the given richter scale criteria and their corresponding characterization. The richter scale serves as the inoput data and the characterization as output information.
Richter Number (n) Characterization
N&lt;5.0 Little Or No Damage
5.0&gt;=N&lt;5.5 Some Damage
5.5&gt;=N&lt;6.5 Serious Damage
6.5&gt;=N&lt;7.5 Disaster
Higher Catastrophe
1
2015-03-11T06:16:05-0400
#include <stdio.h>
int main() {
float n;
// Input
printf("Richter Number: ");
scanf("%f", &n);
// Output
if (n < 5) {
printf("Characterization: Little Or No Damage");
} else if (n >= 5 && n < 5.5) {
printf("Characterization: Some Damage");
} else if (n >= 5.5 && n < 6.5) {
printf("Characterization: Some Damage");
} else if (n >= 6.5 && n < 7.5) {
printf("Characterization: Serious Damage");
} else {
printf("Characterization: Higher Catastrophe");
}
return 0;
}
﻿

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!