Although the following code segments are syntactically correct, each containsan error. Locate the error and indicate what is wrong .A) hours = 12 ;if (hours> 40);cout <<hours<<" hours qualifies for over-time .\n";B) i nterestRate = . 05;if (interestRate = . 07)cout << "This acco unt is earning the maximum rate. \ n";C) i nterestRate = . 05;if (interestRate > . 07)cout << "This acco unt earns a $10 bonus. \n";balance+= 10 .0;

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 11PE
icon
Related questions
Question

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) i nterestRate = . 05;
if (interestRate = . 07)
cout << "This acco unt is earning the maximum rate. \ n";
C) i nterestRate = . 05;
if (interestRate > . 07)
cout << "This acco unt earns a $10 bonus. \n";
balance+= 10 .0;

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Mathematical functions
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT