Computer Science, asked by Redbuster, 7 months ago

Using while loop, create a program to input a number and print all the numbers from 1 to 30 that are divisible by the input number? python

Answers

Answered by baibhav90
1

Answer:

lower=int(input("Enter lower range limit:"))

upper=int(input("Enter upper range limit:"))

n=int(input("Enter the number to be divided by:"))

for i in range(lower,upper+1):

if(i%n==0):

print(i)

Runtime Test Cases

Case 1:

Enter lower range limit:1

Enter upper range limit:50

Enter the number to be divided by:5

5

10

15

20

25

30

35

40

45

50

Case 2:

Enter lower range limit:50

Enter upper range limit:100

Enter the number to be divided by:7

56

63

70

77

84

91

98

Explanation:

Plz mark it as brilliant and follow

Similar questions