Skip to content

Latest commit

 

History

History
56 lines (47 loc) · 638 Bytes

File metadata and controls

56 lines (47 loc) · 638 Bytes

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