Asked by Anon
Is this code right?
Declare Integer days, counter = 1
Declare Real penny = 1, salary, total = 0
Display "Enter a number of days."
Input days
Display "Days",TAB,"Salary
While counter <= days
Set salary = penny/100
Display counter, TAB, salary
Set penny = penny*2
Set counter = counter + 1
Set total = total + salary
End While
Display" The total of your payment is$," total
End Module
Declare Integer days, counter = 1
Declare Real penny = 1, salary, total = 0
Display "Enter a number of days."
Input days
Display "Days",TAB,"Salary
While counter <= days
Set salary = penny/100
Display counter, TAB, salary
Set penny = penny*2
Set counter = counter + 1
Set total = total + salary
End While
Display" The total of your payment is$," total
End Module
Answers
There are no human answers yet.
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.