حالت آفلاین — محتوا از حافظهٔ کش نمایش داده می‌شود
همهٔ تمرین‌ها

بزرگترین عدد دریافت شده

تمرین آسان 12011 visibility link download flag trending_up پربازدید

برنامه ای بنویسید که 3 عدد دریافت کند و بزگترین آنها را در خروجی چاپ کند

👨‍💻 1 ساعت قبل کاربر ناشناس این تمرین رو مشاهده کرد

پاسخ‌ها 88

a=int(input("a:"))
b=int(input("b:"))
c=int(input("c:"))
max=0
if a>max:
    max=a
if b>max:
    max=b
if c>max:
    max=c
    print(max)  
        or
a=int(input("a:"))
b=int(input("b:"))
c=int(input("c:"))
if a>b and a>c:
    print(a)
elif b>a and b>c:
    print(b)
elif c>a and c>b:
        print(c)
x = int(input("Enter your number: "))
y = int(input("Enter your number: "))
z = int(input("Enter your number: "))

max = 0
if x > max:
    max = x

if y > max:
    max = y

if z > max:
    max = z

print("bozorgtarin adad =",max)
a = int(input("a : "))
b = int(input("b : "))
c = int(input("c : "))
max = 0
if  ( a > max and max == a) \
    or( b > max and  max == b )\
    or( c > max  and  max == c ):
       print(max)
n1 = float(input("Enter first number: "))
n2 = float(input("Enter second number: "))
n3 = float(input("Enter third number: "))
print('The largest is :  ',max(n1,n2,n3))
class Max:
    A = int(input("Enter the number: "))
    B = int(input("Enter the number: "))
    C = int(input("Enter the number: "))
    M = max(A,B,C) 
    print("This is the largest number:", M)
print ("Choose 3 numbers.")
Number1 = int ( input ("Number 1 : ") )
Number2 = int ( input ("Number 2 : ") )
Number3 = int ( input ("Number 3 : ") )
TheLargestNumber = Number1
if TheLargestNumber < Number2 :
     TheLargestNumber = Number2
if TheLargestNumber < Number3 :
     TheLargestNumber = Number3
print("The Largest Number is ", TheLargestNumber)
print("hello")

a = int(input("adad aval:"))
b = int(input("adad dovom:"))
c = int(input("adad sevom:"))


if a > b > c:
    print("adad aval bozorh tar ast")
elif a < b > c:
    print("adad dovom bozorg tar ast")
elif a < b < c:
    print("adad sevoom bozorg tar ast")
elif a == b == c:
    print("adad ha ba ham barabr ast")
else:
    print("error")

ارسال جواب

جوابت را با Markdown بنویس و ثبت کن

×
بستن