Computer Science, asked by rounakraj272009, 1 month ago

1) write an algorithm to find greatest of two numbers.​

Answers

Answered by Meghna5371
0

Answer:

Input: num1 = 2, num1 = 8

Output: Largest number = 8

Input: num1 = 20, num1 = 18

Output: Largest number = 20

Explanation:

1.Ask the user to enter two integer values.

2.Read the two integer values in num1 and num2 (integer variables).

3.Check if num1 is greater than num2.

4.If true, then print ‘num1’ as the greatest number.

5.If false, then print ‘num2’ as the greatest number.

Similar questions