C++ How To Program Plus Mylab Programming With Pearson Etext -- Access Card Package (10th Edition)
10th Edition
ISBN: 9780134583006
Author: Deitel
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 5, Problem 5.14E
(Modified Compound-Interest
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Q1) An accountant works for a company and there is a need for a C program to calculate the
average income of fifteen employees after cutting tax from it. Write a program that takes the
gross income of the 15 employees using scanf and check the tax range using the given table
below. Use repetition structure (while or for loop) to calculate the salary of each entployee and
iffelse statements to select the salary based on the gross income. Besides, find the sum of all
the salaries and print the average salary for fifteen employees. The formulation for calculating
the salary is shown below:
Salary = Gross Income
Salary = GrossIncome - GrossIncome 0.05
Salary = GrossIncome - Grosslncome 0.10
GrossIncome < 500$
500$ < GrossIncome < 700$
700$ < GrossIncome < 1000$
1000$ < GrossIncome
Salary =
Salary = GrossIncome - GrossIncome 0.15
C language
Q1) An accountant works for a company and there is a need for a C program to calculate the
average income of fifteen employees after cutting tax from it. Write a program that takes the
gross income of the 15 employees using scanf and check the tax range using the given table
below. Use repetition structure (while or for loop) to calculate the salary of each entployee and
if/else statements to select the salary based on the gross income. Besides, find the sum of all
the salaries and print the average salary for fifteen employees. The formulation for calculating
the salary is shown below:
Salary = Gross Income
Salary = GrossIncome - GrossIncome 0.05
Salary = GrossIncome – Grosslncome • 0.10
Salary = GrossIncome – Grosslncome 0.15
GrossIncome < 500$
500$ < GrossIncome < 700$
700$ < GrossIncome < 1000$
1000$ < GrossIncome
Salary =
Please solve quickly
Chapter 5 Solutions
C++ How To Program Plus Mylab Programming With Pearson Etext -- Access Card Package (10th Edition)
Ch. 5 - Describe the four basic elements of...Ch. 5 - Compare and contrast the while and for iteration...Ch. 5 - Prob. 5.7ECh. 5 - Compare and contrast the break and continue...Ch. 5 - (Find the Code Errors) Find the error (s), if any,...Ch. 5 - Prob. 5.10ECh. 5 - (Find the Smallest Value) Write an application...Ch. 5 - (Calculating the Product of Odd Integers) Write an...Ch. 5 - (Factorials) Factorials arc used problems. The...Ch. 5 - (Modified Compound-Interest Program) Modify the...
Ch. 5 - (Triangle-Printing program)Write an application...Ch. 5 - (Bar- Chart Printing Program) One interesting...Ch. 5 - (Calculating Sales) An online retailer sells five...Ch. 5 - Assume thati = 1, j = 2, k = 3and m = 2. What does...Ch. 5 - (Calculate the value of ) Calculate the value of ...Ch. 5 - (Pythagorean Triples) A right triangle can have...Ch. 5 - (Modified Triangle-Printing Program) Modify...Ch. 5 - (De Morgan`s Laws)In this chapter, we discussed...Ch. 5 - (Diamond -Printing Program) Write an application...Ch. 5 - (Diamond -Printing Program) Write an application...Ch. 5 - Removing break and continue) A criticism of the...Ch. 5 - Prob. 5.26ECh. 5 - Replacing continue with a structured Equivalent)...Ch. 5 - Prob. 5.28ECh. 5 - (Peter Minuit Problem) Legend has it that, in...Ch. 5 - (Dollar Amount Constructor with Two Parameters)...Ch. 5 - (Dollar Amount Arithmetic) Enhance class Dollar...Ch. 5 - Prob. 5.32ECh. 5 - (Dollar Amount with dollars cents Data Members)...Ch. 5 - (Account Class That Stores a Dollar Amount)...Ch. 5 - (Displaying the Interest Rate in the Dollar Amount...Ch. 5 - (Showing That double Values Are Approximate)...Ch. 5 - (Global Warming Facts Quiz) The controversial...Ch. 5 - (Global Warming Facts Quiz) The controversial...Ch. 5 - (Tax Plan Alternatives: The "Fair' Tax") There are...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
What types of coolant are used in vehicles?
Automotive Technology: Principles, Diagnosis, And Service (6th Edition) (halderman Automotive Series)
CONCEPT QUESTIONS
15.CQ3 The ball rolls without slipping on the fixed surface as shown. What is the direction ...
Vector Mechanics for Engineers: Statics and Dynamics
This optional Google account security feature sends you a message with a code that you must enter, in addition ...
SURVEY OF OPERATING SYSTEMS
What is an uninitialized variable?
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Comprehension Check 7-14
The power absorbed by a resistor can be given by P = I2R, where P is power in units of...
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
How does a computers main memory differ from its auxiliary memory?
Java: An Introduction to Problem Solving and Programming (8th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- 1)use two list one for names and one for cost 2) keep total cost you will spend and print the average cost for a gift - ????? could you do this with just one list??? 3) after end of loop print the two list and the average and the number of name and number of cost in the list. (suggestion - use for loop) USE this Program: Holiday = []name = input("enter name").upper()while name != "XXX":cost = float(input("enter amount to spend >0 and <=10"))while cost <=0 or cost >10:print("invalid cost")cost = float(input("enter amount to spend >0 and <=10"))gift = name + " " + str(cost)Holiday.append(name)Holiday.append(cost)Holiday.append(gift)name = input("enter name").upper()print(Holiday)arrow_forwardExplain the body of the loop.arrow_forward(Display patterns using loops) Use nested loops that display the following patterns in two separateprograms: pattern A Pattern B Pattern c 123456 1 3 1 6 1 2 3 3 3 1 6 1 2 3 4 5 3 3 3 1 6 1 2 3 4 5 6 7 3 3 1 6 1 2 3 4 5 6 7 8 9 3 123456arrow_forward
- Which of the following are true about looping statements? (A It is a part of a computer program that makes code(s) repeat itself (B It is also known as an iteration statement. (c) An example of a looping statement is the if-else statement. (D An example of a looping statement is the do-while statement. (E) None of the other choices are correct.arrow_forwardix) Write a C++ program that uses a 'for' loop to print the message "Hello" in the output 10 times in separate lines but the number of iterations of the loop must be 20. Use a counter inside the loop to show the number of iterations of the loop.arrow_forwardQ2) Answer only two A- Using for loops, write a program to find and print the result of: +cc 2 4 6 8 + X² 4.6 1.8 Enter (x) value from the keyboard. B- Using for loop, write a program to calculate the average of the numbers from (1-100) exclude the number (84) from the average. C- Write program to enter infinite number of integers from the keyboard. the program should stop if we enter number 5. + +arrow_forward
- In C have the user enter their beginning principal balance (must be a float greater than zero).If not a float greater than zero, have the user enter again. (Use a do-while loop)Have the user enter their desired annual interest rate (must be a float greater than zero and less than 15%).If not a float greater than zero and less than 15%, have the user enter again. (Hint: Use a do-while loop)Have the user enter their desired number of quarters (must be an integer greater than zero or less than orequal to 44).If not an integer greater than zero and less than or equal to 44, have the user enter again. (Hint: Use a do-while loop)Display all of the information entered in steps 1-6 as seen in the display window below..Ask the user if all of the values are correct. If yes, proceed with step 9. If no, return to step 1. (Hint: Use ado-while loop)For each quarter, calculate and display the beginning principal balance, the interest earned, and the finalprincipal balance for the quarter using a for…arrow_forwardPrlda..arrow_forwardQ1: A. Develop an M-file that input the n value in to a function and display the value of R as a R= 1² +2²+3² ............. n term result. B. Write Matlab code to keep asking for a number until you enter a negative number, using While loop Structure. C. Use a switch statement to rewrite the following code segment x = 1; a = 3; if(a == 1) x = x+5; elseif (a== 2) x = x+10; elseif (a == 3) x = x+16; else x = x+34; end disp(x);arrow_forward
- a) Rewrite the following line using the while loop! for ( int x = 0; x <10; x + = 2) printf (“5”) ; b) using the switch structure , the number 25, Pressing 1 makes 25%,Pressing 2 will double it,When 3 is pressed, the remainder of the section with 3,If a numeric key other than 1, 2, 3 is pressed, 'Wrong selection!' Write a program to print. The screen outputs of the program should be as follows!arrow_forward2.Write a program which produces the given sequence nos. (in alternate arrangement) using the three looping statements: 1, 5, 2, 4, 3, 3, 4, 2, 5, 1. 1" Solution – using for loop statement 2nd Solution- using while loop statement 3d Solution- using do while loop statementarrow_forward(python) Study the following code, specifically the loop. _sum = 10 for k in range (2, 20, 3): _sum = _sum + (2*k) if _sum > 100: print("exceeded 100") Now, rewrite the for loop (for k in range(2, 20, 3):)to be a while loop that accomplishes the same objective. You don't need to show/use the other lines.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Control Structures - while loop - do-while loop - for loop - Goto - break - continue statements; Author: EzEd Channel;https://www.youtube.com/watch?v=21l11_9Osd0;License: Standard YouTube License, CC-BY