Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

minimum of 3 elements

def min3(a,b,c)
    ((a) < (b) ? ((a) < (c) ? (a) : (c)) : ((b) < (c) ? (b) : (c)))
end

print "Min of 3 elements = ", min3(5,6,7);
 
PREVIOUS NEXT
Tagged: #minimum #elements
ADD COMMENT
Topic
Name
8+3 =