Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions

Question

Dear tutors, Please I need help for this assessment

Answered: 1 week ago