Show the overall average miles per gallon.

Assignment Help C/C++ Programming
Reference no: EM13939000

The last printf statement is suppose to show the overall average miles per gallon.

I am unsure about the for loop. I understand how to write the code for the number of gallons used and miles driven, but unsure of how to get the overall average to display.

I know that it is total miles / total gallons, but writing the code is unclear to me.

Reference no: EM13939000

Questions Cloud

Classify the costs as prevention and internal failure : At the beginning of 2009, Kleaner Company initiated a program to improve its environmental  performance. Classify the costs as prevention, detection, internal failure, or external failure.
100 chairs arranged in a circle : At some point in time, the person in chair #1 will be told to leave the room. The person in chair #2 will be skipped, and the person in chair #3 will be told to leave. Next to go is person in chair #6. In other words, 1 person will be skipped initial..
What is causing significantly reduced alveolar ventilation : What nerves and muscles are involved in this case? What is causing significantly reduced alveolar ventilation?
Direct materials versus the completion percentage : If we were to look at an incomplete unit at the end of any given department, would we expect to see a difference in the completion percentage for direct materials versus the completion percentage for conversion costs?
Show the overall average miles per gallon. : I am unsure about the for loop. I understand how to write the code for the number of gallons used and miles driven, but unsure of how to get the overall average to display.
Explain how costs are assigned to activities : Explain how costs are assigned to activities. Describe the value of activity-based customer costing. Explain how ABC can help a firm identify its true low-cost suppliers.
The project involves benchmarking the behavior of java : The project involves benchmarking the behavior of Java implementations of one of the following sorting algorithms, bubble sort, selection sort, insertion sort, Shell sort, merge sort, quick sort or heap sort. You must post your selection in the "Ask ..
Prepare a counter argument to the judge ruling : Prepare a counter argument to the judge's ruling, and explain why the case should be dismissed
Details of the amount of employee entitlements : Having identified 4 issues in part (a), you are now required to identify evidence that the auditor would collect to assess the issue that has been identified. For example, if an issue identified was that 150 staff had just lost their jobs, example..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Amount of the order for computer

Decision Tree Using the SOS, EraTech sends out invoices monthly and will gi,e discounts if payments are made within 10 days, The discount policy is as follows:

  Write c program that forks two child processes

Write a C program that forks two child processes. The parent process will print all prime numbers up to 229, the first child process will print the first 50 Fibonacci numbers.

  What is the relationship between inodes and vnodes

What is the relationship between inodes and vnodes - In a multi-level indexed file system that has 1K blocks what is the maximum file size if the i-nodes contain 8 direct entries, one single and one double indirect entry each?

  Write a for loop that adds the integers

Assume the int variables i , lo , hi , and result have been declared and that lo and hi have been initialized. Write a for loop that adds the integers between lo and hi (inclusive), and stores the result in result .

  Program to declare array alpha of components of type int

Write C++ statements to do the following: Declare an array alpha of 15 components of the type int. Output the value of the tenth component of the array alpha.

  Implement the readlog function

Implement the readLog function below, which is to (1) read the file, (2) populate a vector for each column, and (3) return the number of lines found.

  How to implement a state transition diagram

An Automated External Defibrillator (AED) is used in first aid ere someone has had a heart attack and needs to be kept alive until an ambulance arrives.

  The multi-purpose sorting program that function pointers

3.  Take the multi-purpose sorting program that uses function pointers. Create a new auxiliary function such that the routine will sort numbers in ascending order, but all zeros will be placed at the end of the list. For example, an array with 3, 0, ..

  Write a single program using control structures

For your strength of materials course you wilii write a single program using control structures(including nested loops)and file I/O to explore the deflection of a cantilever beam with a point load at the free end. This is to be on the base on the ..

  How the project teams and coaches master agile methodology

Analyze how the project teams and coaches master the agile methodology to solve business problems. Highlight the one that you believe is the most effective and support your answer.

  Write a program that will read in 2 numbers per line

1.Write a program that will read in 2 numbers per line, and print the sum. You program should work for any number of lines of data.

  Write a program to implement a simple batch operating system

Write a program C/C++ to implement a simple batch operating system. Develop a simple loader, scheduler, memory manager, and shell.

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