Question

c++ code: damage Categorization Design and implement a full C++ program Assignment3_2 that characterizes an earthquake...

c++ code:

damage Categorization Design and implement a full C++ program Assignment3_2 that characterizes an earthquake based on its Richter scale number. Technically, just implement the algorithm you designed for the first assignment. Richter scale is below. Number (n) Characterization ------------------- -------------------------------------- 6.5 or greater : Catastrophe: most buildings destroyed. 6 to less than 6.5: Disaster: houses and buildings may collapse. 5.5 to less than 6: Serious damage: walls may crack or fall. 5.0 to less than 5.5: Some damage. Less than 5.0: Little or no damage. Hint: Use Multiway if statement that works well with the ranges.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include <iostream>

using namespace std;

int main() {

double scale;

//reading scale

cout<<"Enter earthquake based on its Richter scale number: ";

cin>>scale;

//checking if it is greater than 6.5

if(scale>=6.5)

cout<<"Catastrophe: most buildings destroyed.";

//checking if it is in range 6-6.5

else if (scale>= 6 && scale<6.6)

cout<<" Disaster: houses and buildings may collapse.";

//if it is ranges 5.5 to 6

else if(scale>=5.5 && scale<6)

cout<<"Serious damage: walls may crack or fall.";

else if(scale<5.5 )

cout<<"Little or no damage. ";

}

Note : Please comment below if you have concerns. I am here to help you

If you like my answer please rate and help me it is very Imp for me

Add a comment
Know the answer?
Add Answer to:
c++ code: damage Categorization Design and implement a full C++ program Assignment3_2 that characterizes an earthquake...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT