+ 1
write the code to construct the greatest odd number from the user entered number using single array
code using c, c++, java or python but the input should be of users choice and by using single array, we the greatest odd number as result and the result must contain all the entered number
2 odpowiedzi
+ 1
Your problem desciption makes it even more obfuscated. What does "result must contain all the entered number". What is user supposed to input? a number? an array?
in python i'd do the following:
a = int(input())
while a:
if a&1:
break
a-=1
print(str(a)+" is the greatest odd number")
+ 1
sorry strawdog this is not the result of my question