Sum of numbers divisible by 9 within a range

 Sum of numbers divisible by 9 within a range

QUESTION DESCRIPTION

Write a program to find the sum of all integers in a given range which are divisible by 9.


a=int(input())
b=int(input())
s=0
for i in range (a,b):
  if i%9==0:
    s=s+i
print(s)

Comments