Skip to content

Latest commit

 

History

History

maximum-of-three

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Write a function that returns the maximum number among three out of three.


Input 1:

const input1 = 1;
const input2 = 2;
const input3 = 3;
maxOfThreeNumbers(input1, input2, input3);

Output 1:

3

Input 2:

const input1 = 3;
const input2 = 2;
const input3 = 1;
maxOfThreeNumbers(input1, input2, input3);

Output 2:

3

Input 3:

const input1 = 1;
const input2 = -2;
const input3 = 0;
maxOfThreeNumbers(input1, input2, input3);

Output 3:

1

Input 4:

const input1 = -2;
const input2 = 8;
const input3 = 10;
maxOfThreeNumbers(input1, input2, input3);

Output 4:

10