برنامه بررسی بخشپذیری دو عدد
برنامهای بنویسید که دو عدد ورودی را دریافت کرده و بررسی کند آیا عدد اول بر عدد دوم بخشپذیر است یا خیر. به عنوان مثال، اگر ورودیها ۱۰ و ۲ باشند، خروجی باید نشان دهد که ۱۰ بر ۲ بخشپذیر است.
برنامهای بنویسید که دو عدد ورودی را دریافت کرده و بررسی کند آیا عدد اول بر عدد دوم بخشپذیر است یا خیر. به عنوان مثال، اگر ورودیها ۱۰ و ۲ باشند، خروجی باید نشان دهد که ۱۰ بر ۲ بخشپذیر است.
let msg = 'error' alert(msg)این جواب فقط برای مشترکین ویژه قابل مشاهده است
برای مشاهده این جواب باید اشتراک داشته باشی
دریافت اشتراکlet msg = 'error' alert(msg)این جواب فقط برای مشترکین ویژه قابل مشاهده است
برای مشاهده این جواب باید اشتراک داشته باشی
دریافت اشتراکlet msg = 'error' alert(msg)این جواب فقط برای مشترکین ویژه قابل مشاهده است
برای مشاهده این جواب باید اشتراک داشته باشی
دریافت اشتراکdef B(x,y):
if x % y == 0:
print(f'{x} is divisible by {y} ')
else:
print(f'{x} is not divisible by {y}')
while True:
Divisible = int(input("enter number :"))
Divisible1 = int(input("enter number :"))
B(Divisible,Divisible1)
a=int(input("enter the number 1 =-> "))
b=int(input("enter the number 2 =-> "))
if a%b==0:
print("ok")
else:
print("is not visible")
num1 = int(input("num1: "))
num2 = int(input("num2: "))
if num1 % num2 == 0:
print(f"The number {num1} is divisible {num2}")
else:
print(f"The number {num1} isn't divisible {num2}")
from os import system
from time import sleep
system("cls")
while True:
num1=int(input("enter your num1: "))
num2=int(input("enter your num2: "))
system('cls')
if num2==0:
print("numbers cannot dividy by zero")
elif num1%num2==0:
print(f"yes,num1={num1}/num2={num2} = {num1/num2}")
else:
print("No")
print("please wait...")
sleep(4)
system('cls')
quitornot=False
while True:
answer=input("do you want to continue?!(\"Y\" means I wanna continue|\"N\"means I wanna quit): ")
if answer=="y" or answer=="Y":
system('cls')
quitornot=True
break
elif answer=="n" or answer=="N":
system('cls')
quitornot=False
break
else:
system('cls')
print("please answer our question.")
print("please read the above message")
sleep(2)
system('cls')
if quitornot==False:
break
first = int(input('first number'))
sec = int(input('sec number'))
tester = first % sec
a = first/sec
if tester == 0:
print("first / sec =", a)
راحته
num1= int(input())
num2 = int(input())
def barresi(num1, num2):
if num2 == 0 :
print("What? 0 akhe mashti")
elif num1 % num2 == 0:
print(f"{num1} Bakhsh Pazire Bar {num2}")
else:
print(f"{num1} Bakhsh Pazir Bar {num2} nist")
print(barresi(num1, num2))
def check(a:float,b:float,/) -> str:
if b==0:
print(f"The division is not defined !!!by zero")
elif a % b==0:
print(f"They can be divided!!")
else:
print(f"They can't be divided!!")
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام