A snail goes up A feet during the day and falls B feet at night. How long does it take him to go up H feet? Given three integer
numbers H, A and B (A>B), the program should output a number of days
1 answer:
Answer:
H=(A*D)-(B*(D-1))
H = A*D- B*D+B
H-B = (A-B)*D
D= (H-B)/(A-B)
Python 3 code
import math
H=int(input('Enter Height: '))
up=int(input('Enter Number of Feet Up: '))
down=int(input('Enter Number of Feet Down: '))
D=(H-down)/(up-down)
print(math.ceil(D),' Days'
Explanation:
The output of the Program is given in the attached file.
You might be interested in
Answer:
good luck getting an answer then
Explanation:
Home is the answer. Hope this helps. :)
A shift+Tab
I hope it’s work
Answer:
that is technical but I will go with all I mean d