Write a program that will calculate average miles per gallon

Assignment Help Programming Languages
Reference no: EM131322161

1. Solve a simple payroll calculation. Find amount of pay given hours worked and hourly rate. (pay = hourly rate * hours worked.) Run this values (hours = 30 and rate = 8.52) and with (hours = 53 and rate = 11.54). Show two decimal places with all data output.

Display hourly rate, hours worked and pay on the Master Console Output.

The format of the master console output should look similar to this:

PLACE SCREEN SHOTS OF THE FLOWCHART AND ALL I/O HERE.

Show screen shots of the RAPTOR flowchart, all input and the Master Console Output. Save this program.

2. Write a program that will calculate the average miles per gallon obtained on a trip. Input the amount of gas used and the number of miles driven. The formula to calculate miles per gallon is:

miles per gallon = number of miles driven / amount of gas used

Run this problem with:

number of miles driven = 298

amount of gas used = 12.17

Display number of miles driven, amount of gas used and average miles per gallon on the Master Console Output. Show two decimal places with all data output.

Reference no: EM131322161

Questions Cloud

Eliminate hazards if there is alu-alu forwarding only : Add nop instructions to this code to eliminate hazards if there is ALU-ALU forwarding only (no forwarding from the MEM to the EX stage).
Discuss what the appropriate behavior for the situation : Explain which norm you broke and why you chose it. Discuss what the appropriate behavior for the situation you chose would typically require (for example, if you are violating a dress code, discuss what you would normally wear in th..
What are the values of all inputs for the registers unit : For each Mux, show the values of its data output during the execution of this instruction and these register values.
What should the primary purpose of sport be in late : What were some of the "versions of manliness" embedded into college football in the late19thcentury, and to what degree were they the same as, or different from, the versions ofmanliness embedded into prize fighting during the same period?
Write a program that will calculate average miles per gallon : Write a program that will calculate the average miles per gallon obtained on a trip. Input the amount of gas used and the number of miles driven. The formula to calculate miles per gallon is:
What is the speedup from this change : What is the speedup from this change? Assume that the latency of the EX stage is reduced by 20 ps and the latency of the MEM stage is unchanged when branch outcome resolution is moved from EX to MEM.
Focuses on the effect divorce has on children : Over the years, respected authorities have changed their minds several times concerning divorce and its impact on children. Based on your readings, discuss the literature that focuses on the effect divorce has on children?
Write a cpp program that allows the user to create a test : Write a C++ program that allows the user to create a test bank of questions. The program should first ask the user how many questions he or she wishes to create.
Show a pipeline execution diagram for the third iteration : Show all instructions that are in the pipeline during these cycles (not just those from the third iteration).

Reviews

Write a Review

Programming Languages Questions & Answers

  Explain big o notation

What does "n" represent in relation to big O notation?

  Add comment lines for the different sections.

Add comment lines for the different sections.

  Creating a program that writes to a data file

Creating a program that writes to a data file called Celtofarendfile.txt using the end of file structure. The program should create a conversion table of Celsius to Fahrenheit from 0 to 100 Celsius in increments of 5.

  Write subclass for constructor accepting a double

Write a (non-abstract) subclass, ApartmentHouse, containing: a constructor accepting a double, passed to the superclass constructor, and an int used to initialize numberOfApartments

  What is the difference between re-locatable program

What is the difference between re-locatable program and re-locatable data?, Explain the working of increment and decrement instruction ?

  The student class and the examgrades class

The student type should describe student's last name, first name, id ( letter 'N' followed by an 8-digit number), gpa (a real number in the range of 0.0 to 4.0, a whole number of credits completed, and a single letter status indicating full time

  Write a looping program that presents user with three option

Write a looping program that presents the user with 3 options. When the first option is selected, sort the Players array in alphabetical order, keeping the Scores array parallel.

  Write a program that reads a string

Write a program that reads a string and outputs the number of times each lowercase vowel appears in it. Your program must contain a function with one of its parameters as a string variable.

  Perl programming

Create a list of messages that you think would be necessary during server-client and client-client interactions. Do not rely on the implicit acknowledgement of Transmission Control Protocol (TCP) but provide a mechanism for an explicit acknowledgm..

  Writes a function that takes a list of integers

Using ML writes a function that takes a list of integers as argument and returns a pair consisting of the sum of the even position and the sum of the odd positions of the list. You should not use auxiliary functions

  Write function that produces a stream prime numbers

Write a function that produces a stream of positive prime numbers . Use that stream to create a list of the product of all pairs of consecutive prime numbers up to a given value.

  Compare and contrast database connectivity in vb and c#

Compare and contrast database connectivity in VB® and C#. If you studied database connectivity in Java®, include Java® in the comparison. In which language do you find it easiest to implement a connection to a database? Why

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