Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Debug Help. 1. start Declarations num payRate double RAISE_FACTOR = 0.10 showInstructions() input payRate newPay = payRate + payRate * RAISE_FACTOR output Your new pay
Debug Help.
1.
start Declarations num payRate double RAISE_FACTOR = 0.10 showInstructions() input payRate newPay = payRate + payRate * RAISE_FACTOR output "Your new pay rate will be ", newPay stop
int showInstructions() output "Enter your current pay rate" output "in dollars and cents" output "Do not use a dollar sign - " output "Use digits and a decimal point only" return newPay
2.
start Declarations num firstNumber num secondNumber output "Input first number >> " input firstNumber output "Input second number >> " input firstNumber computeProduct() stop string computeProduct(num first, num second) Declarations num answer answer = first * second output first, "times ", second, " is ", result return
3.
// Program passes an array to a method that reverses // the positions of the values start Declarations num LENGTH = 4 num vals[LENGTH] = 33, 55, 77, 99 num sub output "At beginning of main() method..." sub = 0 if sub < LENGTH output vals[sub] sub = sub + 1 endif reverseTheValues(vals) output "At end of main() method.........." sub = 0 while sub < LENGTH output vals[sub] sub = sub + 1 endwhile stop void reverseTheValues(num values) num temp temp = values[0] values[0] = values[3] temp = values[1] values[1] = values[2] values[2] = temp return
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