Greatest Among Three Numbers
- Get link
- Other Apps
CODING PRACTICE - 3
DESCRIPTION
GET HELP
SUBMISSIONS
DISCUSS
Greatest Among Three Numbers
Write a program which prints the greatest among the given three numbers.
Input
The first line of input will contain a number.
The second line of input will contain a number.
The third line of input will contain a number.
Output
The output should be a single line containing the greatest among the three numbers.
Explanation
For example, if the given numbers are 2, 5, and 7. Your code should print the greatest number, which is 7.
Input
The first line of input will contain a number.
The second line of input will contain a number.
The third line of input will contain a number.
Output
The output should be a single line containing the greatest among the three numbers.
Explanation
For example, if the given numbers are 2, 5, and 7. Your code should print the greatest number, which is 7.
Sample Input 1Sample Output 1
2 5 7
7
Sample Input 2Sample Output 2
3 5 2
5
Python 3.9
1
2
3
4
5
6
7
8
9
10
11
a=int(input())
b=int(input())
c=int(input())
if (a>b):
x=a
else:
x=b
if (c>x):
x=c
print(x)
Comments
Post a Comment