subject
Engineering, 25.10.2019 17:43 rosemary909

Public class calculatepennies { // returns number of pennies if pennies are doubled numdays times public static long doublepennies(long numpennies, int numdays) { long totalpennies; /* your solution goes here */ if(){ } 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 on public static void main (string [] args) { long startingpennies; int userdays; startingpennies = 1; userdays = 10; system. out. println("number of pennies after " + userdays + " days: " + doublepennies(startingpennies, userdays)); } }

ansver
Answers: 2

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Explain the difference laminar and turbulent flow. explain it with the shear stress and the velocity profiles.
Answers: 1
question
Engineering, 03.07.2019 19:30
When using the ohmmeter function of a digital multimeter, the leads are placed in what position relative to the component being tested? a. parallel b. control c. series d. line
Answers: 3
question
Engineering, 04.07.2019 18:10
Items are similar to the free issue items, but their access is limited. (clo5) a)-bin stock items free issue b)-bin stock controlled issue c)-critical or insurance spares d)-rebuildable spares e)-consumables
Answers: 1
question
Engineering, 04.07.2019 18:10
Machinery that is a key part of the process and without which the plant or process cannot function is classifed as: (clo4) a)-critical machinery b)-essential machinery c)-general purpose machinery d)-none of the specified options.
Answers: 1
You know the right answer?
Public class calculatepennies { // returns number of pennies if pennies are doubled numdays times pu...
Questions
question
English, 09.04.2021 18:10
question
Mathematics, 09.04.2021 18:10
question
Mathematics, 09.04.2021 18:10
question
Mathematics, 09.04.2021 18:10
Questions on the website: 13722362