write a program to input any number and print the total of its next five number
Answers
Answered by
3
def next_5_total(n):
counter = n
sum_of_nums = 0
for x in range(5):
counter += 1
sum_of_nums += counter
return sum_of_nums
n = int(input("enter a number: "))
print(f"sum: {next_5_total(n)}")
Similar questions
Hindi,
2 months ago
Social Sciences,
2 months ago
Hindi,
2 months ago
India Languages,
4 months ago
English,
4 months ago
Hindi,
9 months ago
Math,
9 months ago