2. Develop a program for the National Earthquake Information centre implementing the following decision table to charact
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
2. Develop a program for the National Earthquake Information centre implementing the following decision table to charact
statement. Does the above problem can be implemented using switch statement? If yes, rewrite the program in (b) using switch statement; if not, explain why.
2. Develop a program for the National Earthquake Information centre implementing the following decision table to characterize an earthquake based on its Richter scale number. Table 1 Richter Scale Number (N) Characterization N< 5.0 Little or no damage 5.0<N< 5.5 Some damage 5.5 <N<6.5 Serious damage: wall may crack or fall 6.5 <N< 7.5 Disaster: house and buildings may collapse higher Catastrophe: most buildings destroyed a) Illustrate the flow of the program by drawing a flowchart for the above problem. b) Develop a complete C program to implement the above problem using if-else