Write a python program to find Divisible numbers among the given numbers by the given Devisor.

Tech Programmer
0

Write a python program to find divisible numbers among the given numbers by the given devisor.


CODE FOR THE ABOVE  PYTHON  PROGRAM :



print("\nENTER FIVE NUMBERS BELOW")
num1 = float(input("\nFirst Number  : "))
num2 = float(input("Second Number : "))
num3 = float(input("Third Number  : "))
num4 = float(input("Fourth Number : "))
num5 = float(input("Fifth Number  : "))
divisor = float(input("\nEnter Divisor : "))
count = 0
print()
print("\nMultiples of ",divisor ,"are : ")
remainder = num1%divisor
if remainder==0:
    print(num1sep="")
    count+=1
remainder = num2%divisor
if remainder==0:
    print(num2sep="")
    count+=1
remainder = num3%divisor
if remainder==0:
    print(num3sep="")
    count+=1
remainder = num4%divisor
if remainder==0:
    print(num4sep="")
    count+=1
remainder = num5%divisor
if remainder==0:
    print(num5sep="")
    count+=1
print(count, "Multiples of" ,divisor ,"Found")


WRITTEN CODE FOR THE ABOVE PROGRAM :


print("\nENTER FIVE NUMBERS BELOW")

num1 = float(input("\nFirst Number  : "))

num2 = float(input("Second Number : "))

num3 = float(input("Third Number  : "))

num4 = float(input("Fourth Number : "))

num5 = float(input("Fifth Number  : "))

divisor = float(input("\nEnter Divisor : "))

count = 0

print()

print("\nMultiples of ",divisor ,"are : ")

remainder = num1%divisor

if remainder==0:

    print(num1, sep="")

    count+=1

remainder = num2%divisor

if remainder==0:

    print(num2, sep="")

    count+=1

remainder = num3%divisor

if remainder==0:

    print(num3, sep="")

    count+=1

remainder = num4%divisor

if remainder==0:

    print(num4, sep="")

    count+=1

remainder = num5%divisor

if remainder==0:

    print(num5, sep="")

    count+=1

print(count, "Multiples of" ,divisor ,"Found")


OUTPUT :




Post a Comment

0Comments
Post a Comment (0)

Featured Highlighted Categories

You'll discover all of the most up-to-date bring innovative here.

Python List theory with List Programs
Get complete python lists theory and list basic and insane programs for your practice.
CBSE SAMPLE PAPERS
Get CBSE sample and question papers of last 7 years with answers to get best practice for your Board Exams
Python String theory and String Programs
Python strings complete theory with illustrations and practice programs for free