Pennies for Pay Write a Flowgorithm program that calculates how much money someone will earn over a period of time under the following conditions: paid one penny the first day, paid two pennies the second day, paid four pennies the third day and pay continues to double each day. Use nested loops to accomplish the following:
Types of Loop
Loops are the elements of programming in which a part of code is repeated a particular number of times. Loop executes the series of statements many times till the conditional statement becomes false.
Loops
Any task which is repeated more than one time is called a loop. Basically, loops can be divided into three types as while, do-while and for loop. There are so many programming languages like C, C++, JAVA, PYTHON, and many more where looping statements can be used for repetitive execution.
While Loop
Loop is a feature in the programming language. It helps us to execute a set of instructions regularly. The block of code executes until some conditions provided within that Loop are true.
Pennies for Pay
Write a Flowgorithm
- paid one penny the first day,
- paid two pennies the second day,
- paid four pennies the third day and
- pay continues to double each day.
Use nested loops to accomplish the following:
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
What I was asking is was the flowgorithm showed on the main function, not the other functions (getDays, doublepennies, showSalary) . I am actually asking how you guys do the other functions for the code to run ? Please see the attached for a better under
![2:47
Program 4 Eight Step Problem So...
Program 4 Eight Step Problem Solving Solution
0. Problem Statement for Pennies for Pay:
Design a program that calculates the amount of money a person would earn over a period of time if
his or her salary (pay) 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 the salary was for each day, and then show the total pay at the end of the period. All output
should be displayed in a dollar amount, not the number of pennies.
1. Major Task List (Keep it abstract; focus on the "what" high level)
a. Determine each day's salary and total salary
b. Display results
2. Structure Chart (Your blue print plan for your functions... who calls who)
getdays double Pennies showSalary
3. Word Analysis: (Which nouns suggest a need for memory (a variable) and which
verbs suggest a need for action (a function maybe).
main
Problem Statement for Pennies for Pay:
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 the 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.
Nouns:
Verbs:
Program
Amount of money
Person
Period of time
Salary
Penny
Day
User
Number of days
Table
Total pay
Period
Dollar amount
Number of pennies
a.
Function
main
getDays
design
days
pennies
calculates
Global Constants:
Constant real PENNIES_TO_DOLLARS_FACTOR = 100 (may change this if your desire
alternate conversion method)
days
5GE
earn
is
ask
display
4 Variable Chart: (Conversion of verbs into camelCase variable names).
(May need additional variables)
Input Interim Output
show
Dashboard Calendar
10
To Do
Notifications Inbox](https://content.bartleby.com/qna-images/question/625c2e6e-8bc9-457b-9d15-558e65a7ee18/1bcf4a0a-fe13-4fa3-b90e-8773201d1e45/4pa63kn_thumbnail.png)
![2:47
Program 4 Eight Step Problem So...
2. Structure Chart (Your blue print plan for your functions...who calls who)
getdays doublePennies showSalary
3. Word Analysis: (Which nouns suggest a need for memory (a variable) and which
verbs suggest a need for action (a function maybe).
Problem Statement for Pennies for Pay:
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 the 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.
Nouns:
Verbs:
Program
Amount of money
Person
Period of time
Salary
Penny
Day
User
main
Number of days
Table
Total pay
Period
Dollar amount
Number of pennies
a.
Function
main
getDays
doublePennies
Global Constants:
Constant real PENNIES_TO_DOLLARS_FACTOR
alternate conversion method)
showSalary
days
pennies
days counter
pennies
days
pennies
4 Variable Chart: (Conversion of verbs into camelCase variable names).
(May need additional variables)
Input Interim Output
days
design
pennies
calculates
?
earn
ᎥᎦ
ask
display
show
.5G E
=
Dashboard Calendar
10
To Do
100 (may change this if your desire
Notifications Inbox](https://content.bartleby.com/qna-images/question/625c2e6e-8bc9-457b-9d15-558e65a7ee18/1bcf4a0a-fe13-4fa3-b90e-8773201d1e45/ni0l50i_thumbnail.png)
Hello, can you provide the functions for the solution please?
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)