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, 04.07.2019 18:10
Coiled springs ought to be very strong and stiff. si3n4 is a strong, stiff material. would you select this material for a spring? explain.
Answers: 2
question
Engineering, 04.07.2019 18:10
Different types of steels contain different elements that alter the characteristics of the steel. for each of the following elements, explain what the element does when alloyed with steel.
Answers: 2
question
Engineering, 04.07.2019 18:10
At 12 noon, the count in a bacteria culture was 400; at 4: 00 pm the count was 1200 let p(t) denote the bacteria cou population growth law. find: (a) an expression for the bacteria count at any time t (b) the bacteria count at 10 am. (c) the time required for the bacteria count to reach 1800.
Answers: 1
question
Engineering, 04.07.2019 18:20
An open feedwater heater operates at steady state with liquid entering at inlet 1 with t? = 40°c and pl = 1 .2 mpa. water vapor att2-200°c and p2 = 1.2 mpa enters at inlet 2. saturated liquid water exits with a pressure of pa 1.2 mpa. neglect heat transfer with the surroundings and all kinetic and potential energy effects, determine the mass flow rate of steam at inlet 2 if the mass flow rate of liquid water at inlet 1 is given as 2 kg/s.
Answers: 3
You know the right answer?
Public class calculatepennies { // returns number of pennies if pennies are doubled numdays times pu...
Questions
question
Social Studies, 24.02.2021 14:00
question
Social Studies, 24.02.2021 14:00
question
Mathematics, 24.02.2021 14:00
question
English, 24.02.2021 14:00
question
Mathematics, 24.02.2021 14:00
Questions on the website: 13722360