CodeSolved

Solved Programming Questions & Exercises

The largest number received

Practice Easy 6/ Download 8146 Views Most popular

Write a program that gets 3 numbers and prints the most in the output

66 Answers

This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
# Receive numbers from the user
n1 = int(input("Enter yor number 1 :"))
n2 = int(input("Enter yor number 2 :"))
n3 = int(input("Enter yor number 3 :"))

# Definition of a variable with zero value
x = 0

#...و x را مساوی کن با n1 باشد x اگر عدد دریافت شده اول بزگ تر از
if n1 > x:
    x = n1

if n2 > x:
    x = n2

if n3 > x:
    x = n3

# Print the largest number on the output
print(x)
num1 = float(input("لطفاً عدد اول را وارد کنید: "))
num2 = float(input("لطفاً عدد دوم را وارد کنید: "))
num3 = float(input("لطفاً عدد سوم را وارد کنید: "))

# Find the largest number
largest = max(num1, num2, num3)

# Printing the largest number
print("بزرگ‌ترین عدد وارد شده:", largest)
Mma123 Download Python
h=int(input('1:'))
n=int(input('2:'))
v=int(input('3:'))
if v>n>h or v>h>n:
    print(v)
elif n>v>h or n>h>v:
    print(n)
elif h>n>v or h>v>n :
    print(h)

num1 = float (input ('Enter number1: '))
num2 = float (input ('Enter number2: '))
num3 = float (input ('Enter number3: '))

plural = list ([num1, num2, num3])
maximum = max (num1, num2, num3)
index = plural.index (maximum)

if index == 0:
    index = 'num1'
elif index == 1:
    index = 'num2'
elif index == 2:
    index = 'num3'

print ('{} = {}'.format(index, maximum))
a = int(input('a: '))
b = int(input('b: '))
c = int(input('c: '))

max = 0
if a > max :
    max = a
if b > max :
    max = b
if c > max :
    max = c
print(max)
Akams Download Python
num1 = int(input("Num1: "))
num2 = int(input("Num2: "))
num3 = int(input("Num3: "))
max = 0

if num1 > max:
    max = num1
if num2 > max:
    max = num2
if num3 > max:
    max = num3

print(max)
Awlizf Download Python
a1=int(input("Enter number1: "))
a2=int(input("Enter number2: "))
a3=int(input("Enter number3: "))
if a1>a2:
    if a1>a3:
        print(a1)
    else:
        print(a3)
elif a2>a3:
    print(a2)
else:
    print(a3)
Saeeda33 Download Python
<< Previous page 1 2 7 Next page >>

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close