write a program to find greatest of any two numbers by using if else statement
Answers
Answered by
3
Answer:
Algorithm to find the greatest of two numbers and greatest of three numbers
Greatest_of_two_numbers(num1, num2):
If (num1 > num2)
Print num1
Else, print num2
Greatest_of_three_numbers(num1,num2):
If (num1 > num2) and (num1 > num3)
Print num1
Else if (num2 > num1) and (num 2 > num3)
Print num2.
Else, print num3
Answered by
1
Answer:
4
Explanation:
2 number
2+2=4
greater no is 2 other no is 4
Similar questions