ASSIGNMENT - 3 Smallest Among 3 Numbers
Smallest Among 3 Numbers
Write a program to print the smallest value among the three numbers
A
, B
, and C
.Input
The first line is an integer
A
.
The second line is an integer B
.
The third line is an integer C
.Explanation
In the given values
A = 6
, B = 5
, C = 4
. 4
is the smallest value among the three. So the output should be 4
.Sample Input 1Sample Output 1
6 5 4
4
Sample Input 2Sample Output 2
-10000 -10000 -10000
-10000
a=int(input()) b=int(input()) c=int(input()) if a<=b and a<=c: print(a) if b<c and b<a: print(b) if c<a and c<a: print(c)
Comments
Post a Comment