Ask Question
7 December, 07:41

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. 7 December, 10:12
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers