subject

Write code to complete DoublePennies()'s base case. Sample output for below program:Number of pennies after 10 days: 1024#include using namespace std;// Returns number of pennies if pennies are doubled numDays timeslong long DoublePennies(long long numPennies, int numDays){long long totalPennies = 0;/* Your solution goes here */else {totalPennies = DoublePennies((numPennies * 2), numDays - 1);}return totalPennies;}// Program computes pennies if you have 1 penny today,// 2 pennies after one day, 4 after two days, and so onint main() {long long startingPennies = 0;int userDays = 0;startingPennies = 1;userDays = 10;cout << "Number of pennies after " << userDays << " days: "<< DoublePennies(startingPennies, userDays) << endl;return 0;}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:00
Complete the sentence about a presentation delivery method
Answers: 2
question
Computers and Technology, 23.06.2019 09:10
Effective character encoding requires standardized code. compatible browsers. common languages. identical operating systems.
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Which of the following tasks is an audio technician most likely to perform while working on a nature documentary? (select all that apply). eliminating potentially distracting background noise adding sound effects making sure the lighting is adequate for a particular scene changing the narration to better match the mood of the documentary
Answers: 3
question
Computers and Technology, 23.06.2019 13:00
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
You know the right answer?
Write code to complete DoublePennies()'s base case. Sample output for below program:Number of pennie...
Questions
question
Mathematics, 23.10.2020 22:00
question
Mathematics, 23.10.2020 22:00
question
Mathematics, 23.10.2020 22:00
Questions on the website: 13722362