0
Write a program that finds the greatest number with in give 3 number by the user
I Wana easy code
3 Antworten
+ 3
You need to make 3 comparation... soomething like that
if (a>b&&a>c)
print (a)
if (b>c && b>a)
print (b)
if (c>a && c>b)
print (c)
Still, you need to check what happens if all numbers are equals.
+ 2
if you're coding in java an easy solution is this:
double largestNumber = Math.max(num1,Math.max(num2,num3));
if you're coding in c# an easy solution is this:
double largestNumber = Math.Max(num1,Math.Max(num2,num3));
0
Thx bro