Sum of first int except divisible for 5:

mail@pastecode.io avatar
unknown
plain_text
a year ago
122 B
1
Indexable
Never
n=int(input("n="))
sum=0
for i in range(1,n+1):
    if i % 5 ==0:
        break
    else:
        sum+=i
print(sum)