INTRO TO C++ LANGUAGE Q1: Write a program that prompts the user to enter two num
ID: 3824362 • Letter: I
Question
INTRO TO C++ LANGUAGE
Q1: Write a program that prompts the user to enter two numbers, a unit price and a quantity. Then compute an order price by multiplying the unit price and quantity, and deduct a discount from the cost of the order based on: 5% off on quantities of 10 or more, an additional 5% off (total discount 10%)on quantities of 100 or more.
Q2: Define a function that takes three input parameters, an integer array of grades, the number of grades, and the minimum passing grade. The function returns a double that is the fraction of passing grades, return 0.7 if 70% of the grades were passing.
Q3: What is printed by: for (int k = 1; k < 10; k *= 2) cout << k; __________________________________________
Explanation / Answer
3) for (int k = 1; k < 10; k *= 2)
cout << k;
Prints : 1 , 2 , 4, 8
Thanks, let me know if there is any concern.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.