A. Write a C program to process a collection of the speeds of vehicles. Your program...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A. Write a C program to process a collection of the speeds of vehicles. Your program should count and print the number of vehicles moving at a high speed (90 miles/hour or higher), the number of vehicles moving at a medium speed (50-90 miles/hour), and the number of vehicles moving at a slow speed (less than 50 miles/hour). It should also display the category of each vehicle. Test your program on the following data: Speed of vehicles (in miles): 43 23 54 57 68 67 51 90 33 22 11 88 34 52 75 12 78 32 89 14 65 67 97 53 10 47 34 B. Modify your program to display the average speed of a vehicle (a real number) at the end of the run. [0.75 mark) A. Write a C program to process a collection of the speeds of vehicles. Your program should count and print the number of vehicles moving at a high speed (90 miles/hour or higher), the number of vehicles moving at a medium speed (50-90 miles/hour), and the number of vehicles moving at a slow speed (less than 50 miles/hour). It should also display the category of each vehicle. Test your program on the following data: Speed of vehicles (in miles): 43 23 54 57 68 67 51 90 33 22 11 88 34 52 75 12 78 32 89 14 65 67 97 53 10 47 34 B. Modify your program to display the average speed of a vehicle (a real number) at the end of the run. [0.75 mark)
Expert Answer:
Answer rating: 100% (QA)
The answer provided is written in Java Language public class speed public static void main Strin... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Write a c program to implement phone book dictionary using Binary Search Tree which provides following operations: (a) add new entry in phone book, (b) remove entry from phone book, (c) search phone...
-
Write a C Program to Check Leap Year using function
-
How do I write a c program to give me the frequency of letters a - z and A - Z which are read from multiple files? I've been using for loops but I'm only allowed to use a for when looping through the...
-
5 Melbourne Corporation has traditionally made a subcomponent of its major product. Annual production of 30,000 subcomponents results in the following costs: Direct materials Direct labor Variable...
-
A survey of magazine subscribers showed that 45.8% rented a car during the past 12 months for business reasons, 54% rented a car during the past 12 months for personal reasons, and 30% rented a car...
-
The system shown in Figure 6.67 consists of two linear springs with stiffnesses \(k_{1}\) and \(k_{2}\) and a uniform bar of mass \(m\) and length of \(2 L\). If the force \(F\) is acting at a...
-
The balance sheet data for Bobs Electronics, Co., November 30, 2010, follow: Requirement 1. The following are three independent assumptions about the business during November. For each assumption,...
-
The returns on the common stock of Maynard Cosmetic Specialties are quite cyclical. In a boom economy, the stock is expected to return 22 percent in comparison to 9 percent in a normal economy and a...
-
Comparative data on three companies in the same service industry are given below. Required: 2. Fill in the missing information. Note: Round the "Turnover" and "ROI" answers to 2 decimal places....
-
Potts, Inc., recently converted from a 5-day, 40-hour workweek to a 4-day, 40-hour workweek, with overtime continuing to be paid at one and one-half times the regular hourly rate for all hours worked...
-
Which evaluation factor assesses the quality of an offeror's recent and relevant performance on previous contracts? (2 Points) a. Technical performance factor b. Past performance factor c. Key...
-
An ore sample weighing 8.60 kg is found to contain 1.40 kg of copper. a) Calculate the percent copper in the ore. Problem-solving: 1.40 KgCu/8.6 Kg Ore times 100 = 16.279 16 % Cu b) write the percent...
-
Explain to the nurse manager why this seemingly easy change was met with such resistance. Is there anything the nurse manager can do at this stage to address the issue? Explain. Make a recommendation...
-
On October 1, Jerry's Carpet Service borrows $250,000 from First National Bank on a 3-month, $250,000, 8% note. 4. What entry must Jerry's Carpet Service make on December 31st before financial...
-
-1 2 - 2 -5 2 1 -2 2 If 1 -1 2 2 = 1, -3-5 -1 1 - -1 = 3, 2 -32 = 1, 2 -3 -2 2 1 -3 2 1 2 1 -5-3= -2. 1 -2-3 Find the solution of the following system of linear equations by Cramer's rule. -21 +2x2...
-
Explain why an engineer might consider banking a curve in an area that gets a lot of rain.
-
1 - net operating income for year 1 and 2 under absorption costing? 2 - net operating income for year 1 and 2 under variable costing? 2. Change all of the numbers in the data area of your worksheet...
-
Write the binomial probability in words. Then, use a continuity correction to convert the binomial probability to a normal distribution probability. P(x 110)
-
Find the radius of convergence and interval of convergence of the series. a. b. 5
-
A company modeled the demand curve for its product ( in dollars) by the equation P = (800000e-x/5000)/(x+20,000) Use a graph to estimate the sales level when the selling price is $16. Then find...
-
If f(n) (0) = (n + 1)! for n = 0, 1, 2, ...., find the Maclaurin series for f and its radius of convergence.
-
A ___________ chart is a histogram that can help you identify and prioritize problem areas. A. Pareto B. control C. run D. scatter
-
What are the Seven Basic Tools of Quality? If applicable, describe how you have you used these tools in the workplace.
-
Perform the monitoring and controlling tasks for one of the case studies provided in Appendix C. If you are working on a real team project, create relevant monitoring and controlling documents, such...
Study smarter with the SolutionInn App