Exercise . Create three arrays as defined below that contains the information based on cars: carName...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Exercise . Create three arrays as defined below that contains the information based on cars: carName = {"Ford", "BMW", "Mercedes", "Chevrolet"} %3D carCountry = {"American", "German", "German", "American"} carPrice = (10000, 12000, 13000, 12500} a. In your main, create a program that asks the user for two integer values between 1 and 4, inclusive. Using the array, your program should print out the names of cars and country of manufacturing corresponding to the numbers the user entered. Your program must REJECT any numbers that's outside this range. b. On a new line, print which car is a cheaper option. An example printed output for Q1 could be: "Please enter two numbers: 43 The cars you chose are Chevrolet which is American made, and Mercedes which is German made. The price of Chervrolet: 12500 is cheaper than Mercedes: 13000" Exercise . Create three arrays as defined below that contains the information based on cars: carName = {"Ford", "BMW", "Mercedes", "Chevrolet"} %3D carCountry = {"American", "German", "German", "American"} carPrice = (10000, 12000, 13000, 12500} a. In your main, create a program that asks the user for two integer values between 1 and 4, inclusive. Using the array, your program should print out the names of cars and country of manufacturing corresponding to the numbers the user entered. Your program must REJECT any numbers that's outside this range. b. On a new line, print which car is a cheaper option. An example printed output for Q1 could be: "Please enter two numbers: 43 The cars you chose are Chevrolet which is American made, and Mercedes which is German made. The price of Chervrolet: 12500 is cheaper than Mercedes: 13000"
Expert Answer:
Answer rating: 100% (QA)
C Code include using namespace std int main int xy ... View the full answer
Posted Date:
Students also viewed these programming questions
-
Write a C++ program that asks a user for an integer, reads it, and outputs one of the following: foo: if the integer is a multiple of 3 bar: if the integer is a multiple of 5 foobar: if the...
-
Write a Java program that accepts two integer values between 25 to 75 and returns true if there is a common digit in both numbers. Sample Output: Input the first number: 35 Input the second number:...
-
Factoring of integers. Write a program that asks the user for an integer and then prints out all its factors. For example, when the user enters 150, the program should print 2 3 5 5
-
Problem 5-47 Amortizing Loans and Inflation (LO3) Suppose you take out a $108,000, 20-year mortgage loan to buy a condo. The interest rate on the loan is 5%. To keep things simple, we will assume you...
-
In a study entitled How Undergraduate Students Use Credit Cards, it was reported that undergraduate students have a mean credit card balance of $3,173 (Sallie Mae, April 2009). This figure was an...
-
Consistent Estimator Another way to measure the closeness of an estimator to the parameter Θ is in terms of consistency. If Θn is an estimator of Θ based on a random sample of n...
-
Traditionally, accountants have been most involved with which portion of the HRM/payroll cycle? a. hiring b. payroll c. training d. performance evaluation
-
Every week, more and more apps (applications) are available for Droid-based smart phones. How does this affect the optimal price for Droid-based smart phones?
-
What is the 90% interval? Round to three decimal places
-
Why have many institutions moved away from the dormitory concept to smaller rooms occupied by two or three juveniles? allows for separation between types of people who are incarcerated makes the...
-
Compose a detailed 3-page response and analysis of the following 3 points with the headings, below. Here is the current assignment Analysis: (in-depth responses requested) - Compare and contrast the...
-
Internal auditors must have independence: a. To ensure their objectivity. b. To be able to audit any activity in the organization. c. To be sure they will receive replies to their reports. d. To have...
-
Which of the following should be defined in the charter of the internal auditing department? a. Types of departmental activity reports to be prepared and to whom they should be distributed. b....
-
In determining whether to rely on the work ofthe internal auditor, the external auditor is expected to consider which of the following: a. Hiring practices of the internal auditing department. b....
-
Which of the following may compromise the independence of an internal auditor? a. Reviewing EDP systems prior to implementation. b. Performing an audit where the auditor recently had operating...
-
Assuming that an organization is not already using the digital technologies you identified above, how could using them improve the functioning of its information systems? (E.g. how would using them...
-
2. In this problem, we will discover how you, yes you, can be employed by Wall Street to cause a major economic collapse! The arbitrage business is a money-making scheme that takes advantage of...
-
Write out the formula for the total costs of carrying and ordering inventory, and then use the formula to derive the EOQ model. Andria Mullins, financial manager of Webster Electronics, has been...
-
Selected information follow for Bush Company: Required a. Calculate the following ratios for 2019. The 2018 results are given for comparative purposes. b. Comment on the changes between the two...
-
Sales of automotive products for Ford Motor Company and General Motors Corporation for a five-year period are: Net sales for Pfizer Inc. and Abbott Laboratories for the same five years follow:...
-
Consider the following financial statements for Nixon Company. During the year, management obtained additional bond financing to enlarge its production facilities. The plant addition produced a new...
Study smarter with the SolutionInn App