Example 8: Find the Greatest Number

Learn how to use if-else conditions to decide the largest number from the available numbers.

Problem

Write a program that takes 5 numbers as parameters, and then print the biggest number amongst all.

Example

Input Output
56, 32, 65, 78, 2 78
2, 5, 4, 8, 10 10
-3, -6, 0, 4, 5 5

Try it yourself

Try to solve this question on your own in the code widget below. If you get stuck, you can always refer to the solution provided.

Get hands-on with 1400+ tech skills courses.