I need to make a program that tells me in how many days do i need to work to get a specific sallary.
Step 1)The program needs to ask how much salary I want.
Step 2)The program will give me as an answer how many days I need to work to get the salary.
For each day the salary doubles with 2.
Day 1 = 1 dollar
Day 2 = 2 dollar
day 3 = 4 dollar
.......I can only work for 30 days
I need to calculate how many days it takes to get the salary im asking for.
For 1000000 dollar then I should get 27 days.
What Problem I have with this question is that I have no idea how to make a loop for this. I dont know how to approach this question. Im a totally beginner in this subject. Please someone explain and show how to do this.