Write a program to print the sum of the first ten natural numbers using the ‘while’ loop in Python language.
Answers
Answered by
1
n = int(input("Enter a number: "))
s = 0
while n <= 10:
s = s + n
print(s)
Similar questions