Write a program to determine and output to the screen the


Please answer these 2 questions below using C++ program. Also, if possible use if and else statement for number 1. And for number 2 use while.

1. Write a program to determine, and output to the screen, the class of an earthquake, given its magnitude. A class of minor is given for those in the range of [0, 4), light if in [4, 5), moderate if in [5, 6), strong if in [6, 7), major if in [7, 8) and great if in [8, oo).

2. Write a program to guess a magic number m 4, and output to a file, each of guesses that are made. A sequence of random numbers is generated, each in the range [1, 10]. If the number is equal to m, then the program terminates. Otherwise, it generates another number. Your submission should include the contents of the output file using a random number generator seed of 760.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program to determine and output to the screen the
Reference No:- TGS02887364

Expected delivery within 24 Hours