Ask Question

Write an algorithm that finds the second-smallest element among a, b, and c. Assume that the values of a, b, and c are distinct

+4
Answers (1)
  1. 20 March, 19:27
    0
    Num = [a, b, c]

    m=0

    for number in num:

    if number > 0:

    m = number

    num. remove (m)

    for number in num:

    if number > 0:

    m = number

    return number

    efficiency-wise this is sh*t, but its a start!
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write an algorithm that finds the second-smallest element among a, b, and c. Assume that the values of a, b, and c are distinct ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers