Answer:
Written in Python
num = int(input("Number: "))
while num < 1:
num = int(input("Number: "))
total = 0
for i in range(1, num+1):
total= total + i
print("Total: "+str(total))
Step-by-step explanation:
This line prompts user for input
num = int(input("Number: "))
The following iteration checks and prompts user for valid input
while num < 1:
num = int(input("Number: "))
This initializes total to 0
total = 0
The following iteration adds from 1 to input number
for i in range(1, num+1):
total= total + i
This displays the total
print("Total: "+str(total))