Question: I need this to output 15 I keep getting 15.0 how do I remove the decimal? Write a program whose inputs are three integers, and

I need this to output 15 I keep getting 15.0 how do I remove the decimal?

Write a program whose inputs are three integers, and whose output is the largest of the three values.

Ex: If the input is:

Input

7

15

3

Output

15

num1 = float(input())

num2 = float(input())

num3 = float(input())

if (num1 >= num2) and (num1 >= num3):

largest = num1

elif (num2 >= num1) and (num2 >= num3):

largest = num2

else:

largest = num3

print (largest)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!