Question
Given the following information: The program prompts user to Enter first name or , EOFNAME, to quit, the user enters the name as John
Given the following information: The program prompts user to "Enter first name or ", EOFNAME, " to quit", the user enters the name as John Smith. The hours and rate are entered as: 10 for hours 20 for rate What is the result when the if statement is executed? start Declarations string name num hours num rate num DEDUCTION = 45 string EOFNAME = "ZZZ" num gross num net output "Enter first name or ", EOFNAME, " to quit" input name while name not equal to EOFNAME output "Enter hours worked for ", name input hours output "Enter hourly rate for ", name input rate gross = hours * rate net = gross - DEDUCTION if net > 0 then output "Net pay for ", name, " is ", net else output "Deductions not covered. Net is 0." endif output "Enter next name or ", EOFNAME, " to quit" input name endwhile output "End of job" stop Group of answer choices
A: Net pay for John Smith is 135. B: Net pay for John Smith is 155. C: Net pay for John Smith is 145. D: End of job
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started