0
I have question guys
You have a magic box that doubles the count of items you put, in every day. The given program takes the initial count of the items and the number of days as input. Task Write a program to calculate and output items' count on the last day. Sample Input 3 2 Sample Output 12 how to solve this?
2 Respuestas
+ 1
1. Two inputs has to be accepted
2. Then, start a counter variable
3. Use a loop to double the items
4. When the loop executes as many times as the number of days, print the items count
If you still have doubts, try to run your code on IDE and correct mistakes
0
Here's another way to double value every day. You have 3 items, then 6, then 12, 24, 48... You have doubled it 4 times. See the pattern? Use it