write a program to check greater of two numbers
Answers
Answer:
Greatest_of_two_numbers(num1, num2):
If (num1 > num2)
Print num1
Else, print num2
Answer :
Algorithm to find the greatest of two numbers and greatest of three numbers
Algorithm to find the greatest of two numbers and greatest of three numbersGreatest_of_two_numbers(num1, num2):
Algorithm to find the greatest of two numbers and greatest of three numbersGreatest_of_two_numbers(num1, num2):If (num1 > num2)
Algorithm to find the greatest of two numbers and greatest of three numbersGreatest_of_two_numbers(num1, num2):If (num1 > num2)Print num1
Algorithm to find the greatest of two numbers and greatest of three numbersGreatest_of_two_numbers(num1, num2):If (num1 > num2)Print num1Else, print num2
Algorithm to find the greatest of two numbers and greatest of three numbersGreatest_of_two_numbers(num1, num2):If (num1 > num2)Print num1Else, print num2Greatest_of_three_numbers(num1,num2):
If (num1 > num2) and (num1 > num3)
If (num1 > num2) and (num1 > num3)Print num1
If (num1 > num2) and (num1 > num3)Print num1Else if (num2 > num1) and (num 2 > num3)
If (num1 > num2) and (num1 > num3)Print num1Else if (num2 > num1) and (num 2 > num3)Print num2.
If (num1 > num2) and (num1 > num3)Print num1Else if (num2 > num1) and (num 2 > num3)Print num2.Else, print num3