This repository has been archived on 2025-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
Files
python_it_top/Practica3/task5_vlkad_rpo254.py
2025-09-22 13:46:31 +05:00

16 lines
537 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

start_sum = int(input())
percent = int(input())
sum_year = int(input())
if start_sum > 0 or percent > 0 or years > 0:
form = 1+percent/100
print("\nрасчет")
curr_sum = start_sum
for i in range(1,sum_year+1):
curr_sum = curr_sum * form
curr_sum = curr_sum // 1 #убрать огромный хвост после запятой
print(f"Год {i}: {curr_sum} руб.")
print(f"Итог сумма через {i} лет: {curr_sum} руб")
else:
print("Числа меньше 0!")