Sure! Here is a simple program in Python to determine which of the two numbers is greater:
# Input two numbers num1 = float(input("Enter first number: ")) num2 = float(input("Enter second number: ")) # Compare the two numbers and print the result if num1 > num2: print(f"{num1} is greater than {num2}") elif num2 > num1: print(f"{num2} is greater than {num1}") else: print("Both numbers are equal")
You can run this program in any Python IDE or online compiler by entering two numbers and it will tell you which number is greater.
Sure! Here is a simple program in Python to determine which of the two numbers is greater:
# Input two numbersnum1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
# Compare the two numbers and print the result
if num1 > num2:
print(f"{num1} is greater than {num2}")
elif num2 > num1:
print(f"{num2} is greater than {num1}")
else:
print("Both numbers are equal")
You can run this program in any Python IDE or online compiler by entering two numbers and it will tell you which number is greater.