Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design a program that calculates the amount of money a person would earn over a

ID: 664996 • Letter: D

Question

Design a program that calculates the amount of money a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day, and continues to double each day. The program should ask the user for the number of days. Display a table showing what salary was for each day, and then show the total pay at the end of the period. The output should be displayed in a dollar amount, not the number of pennies. Please use "Qbasic" code and use the FOR NEXT LOOP to solve this. DO NOT USE ANY OTHER PROGRAMMING LANGUAGE

Explanation / Answer

DIM num1 as double

DIM temp as double

DIM x as INTEGER

CLS

INPUT "Enter the number of days", num1

for x=1 to num1

temp=temp*x;

NEXT x

temp = temp/100;

PRINT temp

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote