Write a program to determine the class of an earthquake

Assignment Help Computer Engineering
Reference no: EM132209687

Answer the following Question :

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, infinity).

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.

Reference no: EM132209687

Questions Cloud

Determine whether or not an entered password is valid : Write a program to determine whether or not an entered password is valid.
Write a program to determine the time and date corresponding : Write a program to determine the time and date corresponding to a elapsed number of seconds since 00: 00: 00 on 1 January 2016.
Write a program to determine the average momentum : Write a program to determine the average momentum of a collection of items with random velocities and masses.
Display a centimeters- to- inches conversion table : Write a program to display a centimeters- to- inches conversion table. The smallest and largest number of centimeters in the table are input values.
Write a program to determine the class of an earthquake : Write a program to determine, and output to the screen, the class of an earthquake, given its magnitude.
Write a program that declares and initializes 2 integer : Write a program that declares and initializes 2 integer variables a and b with the values 35 and 14 and displays and calculates their sum.
Create and print a random phone number of the form : Write a program that creates and prints a random phone number of the form XXX-XXX-XXXX. Include the dashes in the output.
Write a program that creates 2 posix threads : Write a program that creates 2 posix Threads. First thread must write lowercase letters from 'a' to 'z' on the screen and the second thread.
Implement a priority based pre-emptive scheduling algorithm : Write a program in either C or C++ that implements a Priority based Pre-emptive Scheduling Algorithm.

Reviews

Write a Review

Computer Engineering Questions & Answers

  How many different 8-bit block ciphers can there be

In this scenario, how many different ciphertexts are there? How many different 8-bit block ciphers can there be?

  Write a function called is_anagram

Write a function called is_anagram.

  What are the pros and cons of a dhcp server

What are the pros and cons of having a DHCP server on each network segment, versus having some of the network segments receive their IP address and network configuration via a router using a DHCP relay agent? Consider how your answer depends on th..

  Show the schematic diagram of memory system

In each of the designs in Problem, show the physical location of the following addresses: 0, 48, 356, and 8192.

  Explain what is a reflective cross-site scripting attack

What is a cross-site scripting attack? Explain in your own words. What is a reflective cross-site scripting attack? Which Web application attack is more likely to extract privacy data elements out of a database?

  Define how is the tours content and function

What technologies are used to create the experince in tours memorable?

  Design a minimum component circuit

The 68000 interrupt structure requires several external packages, if its full facilities are to be used. Suppose that only four interrupt levels are needed.

  Identify and recommend two tools for forensic examination

Identify and recommend 2 tools for forensic examination. Explain why you would recommend this tool over others that you researched.

  Compare the execution times of the two versions of program

Write a C program to compute binom(n,m) recursively. The values for n and m should be passed as command-line arguments with appropriate error checking.

  Find the output and next state sequence

For the flow table shown below: Find the output and next state sequence for the input sequence.

  How do you convert contents of file shortlist to uppercase

How do you remove repeated lines from an unsorted file where repeated lines are contiguous. How do you convert the contents of the file shortlist to uppercase?

  Define common threats that can adversely distress a network

Your task in this assignment is to create a one-to-two page paper that identifies and defines common threats that can adversely distress a network.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd