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.
#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
c++ code: damage Categorization Design and implement a full C++ program Assignment3_2 that characterizes an earthquake...