Max of Three Numbers - aloalgo

Max of Three Numbers

Very Easy

Write a function that takes three numbers, a, b, and c, and returns the largest of the three. You are not allowed to use any built-in maximum-finding functions or methods provided by the language's standard library.

Example 1

Inputs
a = 5
b = 2
c = 8
Output
8
Explanation:

8 is greater than 5 and 2.

Example 2

Inputs
a = 10
b = 10
c = 7
Output
10
Explanation:

10 is the largest, even with duplicates.

Example 3

Inputs
a = -1
b = -5
c = -3
Output
-1
Explanation:

-1 is the largest among the negative numbers.

Loading...
Inputs
a = 5
b = 2
c = 8
Output
8

Hello! I am your ✨ AI assistant. I can provide you hints, explanations, give feedback on your code, and more. Just ask me anything related to the problem you're working on!