14653 - Find the maximum of three integers   

Description

Write a C program that accepts three integers and finds the maximum of three.

Note that you can use "comparision" operator to do this exercise. However, it is suggested to use the following format instead: 

Assume x, y and z are three inputted integers:

  • temp = (x + y + abs(x - y)) / 2;

  • max = (temp + z + abs(temp - z)) / 2; 

​Note that abs here stands for the absolute value. Also, in order to use abs function, you have to include <stdlib.h> first. 

Input

Three input integers

Output

The maximum of the inuput integers.

Ensure that the output, including formatting, exactly matches the provided samples.

Sample Input  Download

Sample Output  Download

Tags

11410EE 231002



Discuss