تفاضل سن پدر و پسر
برنامه ای بنویسید که سن پدر و پسری را از ورودی دریافت کند و تفاضل (تفریق) آنها را در خروجی چاپ کند
👨💻 1 ساعت قبل کاربر ناشناس این تمرین رو مشاهده کرد
برنامه ای بنویسید که سن پدر و پسری را از ورودی دریافت کند و تفاضل (تفریق) آنها را در خروجی چاپ کند
boyage = 28 fatherage = 69 int( boyage ) int( fatherage) print ( fatherage - boyage)
rostam = int(input("age rostam: "))
sohrab = int(input("sohrab age: "))
resul = rostam - sohrab
print(resul)
a=int(input("Dad please enter your age:"))
b=int(input("Son please enter your age:"))
print("Your age difference is equal to:",a-b)
age1= int(input("boy:"))
age2= int(input("father:"))
print(age2 -age1)
a = input(" sen pedar ra vared kon : ")
age_father = int(a)
b = input(" sen pesar ra vared kon : ")
age_son = int(b)
difference = age_father - age_son
print ( " age_father :" , age_father )
print ( " age_son :" , age_son )
print ( " difference of age :" , difference )
father = (input("sene pedar ra vared konid: "))
son = (input("sene khod ra vared konid: "))
father = int(father)
son = int(son)
print("tafazol shoma va pedare shoma be bedin sorat ast =" , father - son)
fatherage=float(input (" (سن یکم)سن مورد نظر را وارد کنید: "))
boyage=float(input("(سن دوم)سن مورد نظر را وارد کنید:"))
print("تفاضل سن :",fatherage-boyage)
sp=(int(input("sen pedar: ")))
sp0=(int(input("sen pesar: ")))
print(sp-sp0)
father = float(input("father: "))
boy = float(input("boy: "))
print(father - boy)
# تفاضل سن پدر و پسر
a = int(input("Enter the father's age: "))
b = int(input("Enter the boy's age: "))
if a > b:
print("Age difference = " , a - b)
else:
print("Error. The father's age must be older than the son's age!")
جوابت را با Markdown بنویس و ثبت کن
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نامتوضیح کوتاهی بنویسید تا تیم بررسی کند.