Ask Question
7 February, 00:24

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

+2
Answers (1)
  1. 7 February, 03:05
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers