Write a program to find the greatest among three numbers plzzz
Answers
Answered by
2
Answer:
Python:
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
num3 = float(input("Enter third number: "))
if (num1 > num2) and (num1 > num3):
largest = num1
elif (num2 > num1) and (num2 > num3):
largest = num2
else:
largest = num3
print("The largest number is",largest)
Java:
You have to write your html code on your own
function max_of_three(x, y, z)
{
max_val = 0;
if (x > y)
{
max_val = x;
} else
{
max_val = y;
}
if (z > max_val)
{
max_val = z;
}
return max_val;
}
console.log(max_of_three(1,0,1));
console.log(max_of_three(0,-10,-20));
console.log(max_of_three(1000,510,440));
Answered by
0
output for python program brother
Similar questions