Advertisement
Guest User

HomeWork

a guest
Apr 19th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. summ=0
  2. count=0
  3. while True:
  4.     x=int(input())
  5.     if x==0:
  6.         break
  7.     if x%8==0:
  8.         summ=summ+x
  9.         count=count+1
  10. if count>0:
  11.     print("Среднее арифметическое чисел, кратных 8 = ", summ/count)
  12. else:
  13.     print("NO")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement