CodeSolved

A comprehensive source of programming questions and exercises

Compare 2 numbers

Practice Easy 65/ Download 3319 Views

Write a program that receives 2 numbers from the input and prints the larger number

21 Answers

This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
a = int(input(" namber:")
b = int(input("shomare : ")
if a  > b :
    print(a)
else:
    print(b)
entry1 = int(input("your number : "))
entry2 = int(input("your number : "))
def chap(num1,num2):
    if num1 > num2:
        print(f"number is big : {num1}")
    elif num1 < num2:
        print(f"number is big : {num2}")
    elif num1 == num2:
        print(f"number1 and number2 is equal")
chap(entry1,entry2)
Mohamad Download Python
num1 = int(input("number 1: "))
num2 = int(input("number 2: "))

if num1 >= num2:
    print(num1)
else:
    print(num2)
a=int(input('num:'))
b=int(input('num:'))
c=0
if a>0:
    c=a
    if b>a:
        c=b
    print(c)
Maryam.n Download Python
X=float(input("x: "))
Y=float(input("y: "))
if X>Y:
  max=X
else:max=Y
print(max)
Farbod.313 Download Python
A = int(input("Enter Number: "))
B = int(input("Enter Number: "))
Max =max(A,B)
print(Max)
Amirali Download Python
num1 = float(input("لطفاً عدد اول را وارد کنید: "))
num2 = float(input("لطفاً عدد دوم را وارد کنید: "))

# Compare and print larger number
if num1 > num2:
    print(f"عدد بزرگ‌تر: {num1}")
elif num2 > num1:
    print(f"عدد بزرگ‌تر: {num2}")
else:
    print("هر دو عدد برابر هستند.")
Mma123 Download Python
<< Previous page 1 2 3 Next page >>

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close