Module: (Python) Conditional statement


Problem

13 /17


Maximum of four numbers

Problem

Write a program that displays the maximum of four integers entered from the keyboard. Use a algorithm to write the program.
 
ALGORITHM
  1. Enter the input of four variable values ​​from the keyboard.
  2. Assign the value of the M variable to the first of four variables.
  3. If the value of the second variable is greater than the value in the M variable, then replace the value of the M variable with the value of the second variable.
  4. If the value of the third variable is greater than the value in the variable M, then replace the value of the M variable with the value of the third variable.
  5. If the value of the fourth variable is greater than the value in the variable M, then replace the value of the M variable with the value of the fourth variable.
  6. Output the value of the M variable on the screen.

Following this algorithm, write a program.

Input format
The program receives as input four integers, written on one line, separated by a space.

Output format
Output one number - the maximum number among the entered numbers.