350,737 views
12 votes
12 votes
4) Programming a) WAp to find the greatest number among any three numbers.​

User Jason Harrelson
by
2.9k points

2 Answers

30 votes
30 votes

def comp_num (num1, num2, num3):

try:

if num1 > num2 and num1 > num3:

print ( "{0} is the biggest".format(num1) )

elif num2 > num1 and num2 > num3:

print ( "{0} is the biggest".format(num2))

elif num3 > num2 and num3 > num1:

print ( "{0} is the biggest".format(num3))

except ValueError:

return "Invalid input"

num_1 = int (input (" Please enter a number: "))

num_2 = int (input (" Please enter a second number: "))

num_3 = int (input (" Please enter a third number: "))

print (comp_num (num_1, num_2, num_3))

User Fio
by
3.2k points
9 votes
9 votes

Answer:

this is in qbasic programming

4) Programming a) WAp to find the greatest number among any three numbers.​-example-1
User Znkr
by
2.7k points