Files
42-Piscine_Python/00/ex5/ft_count_harvest_recursive.py
David Gailleton 01854a4fb7 piscine 00
2025-12-18 15:39:15 +01:00

10 lines
274 B
Python

def ft_count_harvest_recursive(x=-1):
if x < 0:
print("Days until harvest:", end=" ")
x = int(input())
ft_count_harvest_recursive(x)
print("Harvest time!")
elif x > 0:
ft_count_harvest_recursive(x - 1)
print("Day", x)