Computer Science, asked by PrishaChawda, 5 months ago

write a java program to find smallest number of three​

Answers

Answered by Anonymous
0

Explanation:

Input the first number: 25

Input the Second number: 37

Input the third number: 29

25 is the smallest number

Answered by sathwik2008
1

Answer:

have used ternary operator twice to get the final output because we have done the comparison in two steps:

First Step: Compared the num1 and num2 and stored the smallest of these two into a temporary variable temp.

Second Step: Compared the num3 and temp to get the smallest of three.

If you want, you can do that in a single statement like this:

Similar questions