Header Ads Widget

Python program to find the maximum among three numbers

 

  Python program to find the maximum among three numbers 

Given three numbers , write a program to find the maximum among these numbers .

Sample input:

5  4 7

Sample output:

7 is maximum

 Python program to find the maximum among three numbers 

The objective of the code is to find the maximum among three numbers given by user .

Code(Python):-

a=int(input())
b=int(input())
c=int(input())
if a>b:
if a>c:
print(f"{a} is maximum")
else:
print(f"{c} is maximum")
else:
if b>c:
print(f"{b} is maximum")
else:
print(f"{c} is maximum")


Output:-

5
4
7
7 is maximum

Recommended Post :-

HCL Coding Questions:-

Capgemini Coding Questions:-

Companies interview:-

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-