Hello :D | Sololearn: Learn to code for FREE!
+ 2

Hello :D

Hello , can anyone help me again :D while Loops 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 Explanation Day 1: 6 (3*2) Day 2: 12 (6*2) Use *= operator to multiply the count of the items by 2 in each iteration. i dont understand wich code i will use , my problem is that I am not very good at English so I do not understand 100% of everything

8th Oct 2021, 3:52 PM
Raoof Zakarna
3 ответов
+ 2
The program should calculate the items that you have after doubling it till the day u entered.... Check out the code below:.. https://code.sololearn.com/cGHM7rr5Rsqg/?ref=app
8th Oct 2021, 4:08 PM
Indira
Indira - avatar
+ 2
Hello! All the problem is asking you to do is to use a while loop that runs the same number of times as you have days. Once you have that, all you need to do is use *= on the count of the items. If you reach the last day, print out the new count.
8th Oct 2021, 3:58 PM
Jibraeel Abdelwahhab
Jibraeel Abdelwahhab - avatar
+ 1
indira & jibraeel thank you for help 🤲
8th Oct 2021, 4:16 PM
Raoof Zakarna