Skip to content

Commit

Permalink
selection statement
Browse files Browse the repository at this point in the history
  • Loading branch information
linrakesh committed Dec 31, 2019
1 parent 3431157 commit 89ba938
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions selection_statement/largest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
a = int(input('Enter first number :'))
b = int(input('Enter second number :'))
c = int(input('Enter third number :'))
lar = a
if(lar < b):
lar = b
if(lar < c):
lar = c
print(lar, ' is the largest number')
11 changes: 11 additions & 0 deletions selection_statement/largest2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
a = int(input('Enter first number :'))
b = int(input('Enter second number :'))
c = int(input('Enter third number :'))
if(a > b and a > c):
print(a, ' is the largest number')

if(b > a and b > c):
print(b, ' is the largest number')

if(c > b and c > a):
print(c, ' is the largest number')

0 comments on commit 89ba938

Please sign in to comment.