- 4

A program in python

Write a program that examines 3 variables-x,y,z and prints the largest odd number among them.If none of them is odd,it should print a message to that effect

18th Sep 2019, 4:29 AM
SOUMYADEEP BISWAS
10 ответов
18th Sep 2019, 5:06 AM
Trigger
Trigger - avatar
+ 4
Oh, great idea. I'm waiting for it.
18th Sep 2019, 4:36 AM
Airree
Airree - avatar
+ 3
I would request you to post your attempt before asking others. And also search for similar questions before posting to avoid duplicates.👍
19th Sep 2019, 7:05 PM
Manoj
Manoj - avatar
+ 2
Ok i am posting my code in c++ pls check and tell me if there is any error https://code.sololearn.com/cSkN0dDxgukp/?ref=app
18th Sep 2019, 5:35 AM
SOUMYADEEP BISWAS
0
Please prefer posting quizes in Activity Feed instead.
18th Sep 2019, 4:46 AM
Seb TheS
Seb TheS - avatar
0
Its not a quiz i need help in the question
18th Sep 2019, 4:47 AM
SOUMYADEEP BISWAS
0
post.your.attempt.
18th Sep 2019, 4:57 AM
Choe
Choe - avatar
0
if((x%2==0)&&(y%2==0)&&(z%2==0)) cout<<"There are no odd numbers"; if((x%2==1)&&(x>y)&&(x>z)) cout<<"x is the greatest odd number"; if((y%2==1)&&(y>x)&&(y>z)) cout<<"y is the greatest odd number"; if((z%2==1)&&(z>x)&&(z>y)) cout<<"z is the greatest odd number"; that should do it.
18th Sep 2019, 5:47 AM
Choe
Choe - avatar
0
a=int(input("Enter 1st number : ")) b=int(input("Enter 2nd number : ")) c=int(input("Enter 3rd number : ")) if a%2==0 and b%2==0 and c%2==0: print("All three number a,b,c are not odd"); else: if a>b and a>c: print("a=",a,"is largestnumber" elif a>b and c>a: print("b=",b,"is largestnumber) else: print("c=",c,"is largest number")
18th Sep 2019, 12:12 PM
Praphull Kumar
Praphull Kumar - avatar