Question

A. Given a list of number, describe an algorithm on how would you find the smallest...

A. Given a list of number, describe an algorithm on how would you find the smallest number in the list.

B. Create an HTML document that shows the following

"Price List

Jacket $89.99
Pants $59.99
Shirt $45.99

"

0 0
Add a comment Improve this question Transcribed image text
Answer #1
1.
int findMin(int values[], int size){
    int min = Integer.MAX_VALUE;
    for(int i = 0;i<size;i++){
        if(min > values[i]){
            min = values[i];
        }
    }
    return min;
}


2.
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
    border: 1px solid black;
}
</style>
</head>
<body>

<h2>Price List</h2>

<table style="width:100%">
  <tr>
    <td>Jacket</td>
    <td>$89.99</td>
  </tr>
  <tr>
    <td>Pants</td>
    <td>$59.99</td>
  </tr>
  <tr>
    <td>Shirt</td>
    <td>$45.99</td>
  </tr>
</table>

</body>
</html>

Add a comment
Know the answer?
Add Answer to:
A. Given a list of number, describe an algorithm on how would you find the smallest...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT