Although the following code segments are syntactically correct, each contains an error. Locate the error and indicate what is wrong.
A) hours = 12;
if (hours> 40);
cout <<hours<<" hours qualifies for over-time .\n";
B) interestRate = .05;
if (interestRate = .07)
cout << "This account is earning the maximum rate. \n";
C) interestRate = .05;
if (interestRate > .07)
cout << "This account earns a $10 bonus. \n";
balance += 10.0;
Trending nowThis is a popular solution!
Chapter 4 Solutions
Starting Out with C++: Early Objects
Additional Engineering Textbook Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
Modern Database Management
Introduction To Programming Using Visual Basic (11th Edition)
Starting Out with C++ from Control Structures to Objects (9th Edition)
Elementary Surveying: An Introduction To Geomatics (15th Edition)
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
- The company discounted used cars pays their employees according to this chart: 250$ per months plus 50$ per car sold. If the salesman sells more than 10 cars, the employee receives a bonus of 5% of the total of his sales, in addition to his regular salary.Each month, the owner sits in front of the computer, and enters the following information: The name of the employee, the number of cars sold, as well as the total of all the sales for the month. algorithm that will calculate the salary of an employee for the month, and then display on the screen, his name, total cars sold, base salary, bonus if applicable and entire salaryarrow_forwardL et D= { s, d, b}, E= { c, k}, G= { a, k }, U={a, b, c, d, k, s} DUE=arrow_forward1 %oY li. l. EV docs.google.com/forms/d/e D bläi 4 This code enter a number represents a Celsius degree (C) then converts it to Fahrenheit degree (F) according to the relation: F = (9C / 5) + 32 Then print the grade of this degree by using the * :following relations "C" when F 41. "N" when 4177. Private Sub Command1_Click() Dim C, F As Double C = InputBox("C") F= (9 * C / 5) + 32 1-.. Print ("C") 2-. Print ("N") 3-.. Print ("H") 4.. End Sub 1-lf F 77 4-End If 1-lf F <41 Then 2-Elself F <= 77 Then 3-Else 4-End If 1-lf F<= 41 Then 2-Elself F <= 77 Then 3- Else 4-Blankarrow_forward
- 1. Look at the following partial code. function checker(x) { var got_an_A = true; if (x >= 90) { got_an_A = true; } else { got _an_A = false; if (got_an_A != true) { document.getElementById("tbx1").value = "Did not get the A"; } else { document.getElementByld("tbx1").value = "Got the A"; } a. What will be the value of the textbox with the id: thxl if we have the following function call: checker(95); b. What will be the value of the textbox with the id: thxl if we have the following function call: checker(85);arrow_forwardWhat is the opposite of greater than?arrow_forwardALI=2; Cout<< ALI; Select one: True Falsearrow_forward
- Book (ISBN, Category, BTitle, Quantity,CID) Sales (SalesNo, Month_Year, TotalSales, ISBN) Shop (RegNo, Location, SalesNo) Customer (CID, CName, TelNo, Age) (ii)What was the title and category of the book that the customer Emekabought? (iii)Who purchased the book in the Coding category,or the quantity is greater than two? (iv)What isthe total sales and location of the shop with the registration number "REG KL 100" in the month ofApril 2021? (v)Display the identification number, name, age together with the total salesof the customers who purchasedthe Computer Fundamentals title book.arrow_forwardWhat is the relational operator for less than or equal to? a. =< b. <= c. => d. >=arrow_forwardProblem 2 Concert Tickets 8 points There are three tickets for a concert. The VIP tickets cost $120, premium tickets cost $80, and regular tickets cost $40. Prompt the user how many tickets of each category he would like. Then print an invoice with overview of the order and total price. Include a sales tax of 9.25%. How many tic kets would you like to order? VIP Tickets ($120): 0 Premium Tickets ($80) : 4 Regular Tickets ($40): 2 Invoice: $120 x 0= $ 0.00 $ 80 X 4 = $320.00 $ 40 x 2 = $ 80.00 9.25% $ 37.00 VIP: Premium: Regular: Sales Tax: Total Price: $437.00arrow_forward
- True or False The order of operations dictates that the division operator works before the addition operator does.arrow_forwardRedraw the flowchart design of the problem by comparing of sales value in descending value order. False A If Sales > 2000 Commission = .02 B True False If Sales > 4000 True Commission False = .04 Commission = .07 If Sales > 6000 True Commission = .1arrow_forwardThe company « Super discounted used cars inc.» pays their employees according to this chart: 250$ per months plus 50$ per car sold. If the salesman sells more than 10 cars, the employee receives a bonus of 5% of the total of his sales, in addition to his regular salary. Each month, the owner sits in front of the computer, and enters the following information: The name of the employee, the number of cars sold, as well as the total of all the sales for the month. Write an algorithm that will calculate the salary of an employee for the month, and then display on the screen, his name, total cars sold, base salary, bonus if applicable and entire salary.arrow_forward
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT