To find Number divisible by another
Number Cusing while loop) in python
Answers
Answered by
0
Answer:
12,65,54,39,102,339,221
Explanation:
no. divisible by 13 are 65,29,221
Answered by
0
Python program for the above question is listed below :
Explanation:
number=int(input("Enter the number"))#Take the number from the user input.
divisible=int(input("Enter the divider"))#Take the divider value from the user.
c=0#variable for while loop.
while(c==0):#While loop.
if(number%divisible==0):#check the number to be divisible or not.
c=1
print("Number is divisible")
else:
c=1
print("Number is not divisible")
Output :
- If the user input as 4 and 2, it will print the divisible.
- If the user input as 3 and 2, it will print not the divisible.
Code Explanation :
- The above code is in python language, which holds the while loop, which will runs on 1 time, because in a single time it will known that any number is divisible by another number or not.
- There is if-else case which is used to tell that the number is divisible or not.
Learn More :
- Python : https://brainly.in/question/14689905
Similar questions