Finding The Greatest Of Three Numbers Algorithm

Princy Prakash
1 min readMay 11, 2023

--

ALGORITHM:

  1. The program prompts the user to enter three integer values and reads them into the variables num1 ,num2 and num3.
  2. The program then checks which number is the greatest by comparing num1,num2 and num3
  3. The first condition checks if num1is greater than or equal to num2 AND num3. If this condition is true, the program prints that num1is the greatest number.
  4. If the first condition is false, the program moves on to the second condition, which checks if n is greater than or equal to num1AND num3. If this condition is true, the program prints that num2 is the greatest number.
  5. If both the first and second conditions are false, the program moves on to the third condition, which is the default. This condition assumes that num3 is the greatest number, and it is printed as such.
  6. After determining the greatest number, the program ends.

FLOWCHART:

--

--

Princy Prakash
Princy Prakash

Written by Princy Prakash

Hi I Am Princy. I recently discovered my passion for programming and excited to get deeper into the world of technologies also in problem-solving

No responses yet