Computer Science, asked by vk162910, 4 months ago

Write a python program to accept any integer number and display its multiple of 3 and 5

or not.​

Answers

Answered by shaumz
2

Explanation:

There are floor(999/3) multiples of 3, floor(999/5) multiples of 5, and floor(999/15) multiples of 15 under 1000. = 3 * (333 * 334 / 2) because the sum of the integers from 1 to k is k*(k+1)/2. Use the same logic for the sum of multiples of 5 and 15. This gives a constant time solution

Answered by Anonymous
0

Answer:  x=int(input("Enter a number : "))

for i in range(1,6):

  print(i*x)

Explanation:  Please mark me as brilliant

Similar questions