1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
katovenus [111]
1 year ago
6

Describe an algorithm for finding the smallest integer in a finite sequence of natural numbers.

Mathematics
2 answers:
Crazy boy [7]1 year ago
5 0

Answer:

min = a_1

for i:= 2 to n:

      if a_i < min then min = a_i

return min

Step-by-step explanation:

We call the algorithm "minimum" and a list of natural numbers a_1, a_2, \cdot\cdot\cdot, a_n.

So lets first set the minimum to a_1

min = a_1

now we want to check all the other numbers.

We can use a simple for loop, to find the minimum

min = a_1

for i:= 2 to n:

      if a_i < min then min = a_i

return min

Aliun [14]1 year ago
3 0

Answer:

The sequence of natural numbers is a_1, a_2, a_3, ..., a_n.

Use min as the variable that will contain the minimum value.

Set min = a_1

In a loop, compare min to each number from a_2 to an.

If min > a_i, then let min = a_i

min = a_1

for i = 2 to n

  if min > a_i, then min = a_i

You might be interested in
Please help! Urgent!<br> What is the measure of angle B? <br><br> -78°<br> -92°<br> -102°<br> -282°
Step2247 [10]
C i believe because 180 is the overall degree and 50+28=78 and 180-78=102
7 0
3 years ago
Read 2 more answers
Subtract polynomials (intro)
svlad2 [7]
563 is the answer to your question
3 0
2 years ago
Ellie wanted to know how much her mother spent on groceries weekly, so she saved each week's receipt for a whole year.
Aloiza [94]
Mean or c is the answer
7 0
3 years ago
Read 2 more answers
Which graph shows the solution to the following inequality?<br>4d- 6 &lt; 18 <br>PLEASE HELP​
kenny6666 [7]

Answer:

answer a

Step-by-step explanation:

4d-6 < 18

  • Let's isolate d on one side of the equation. Ignore the inequality for now. We'll deal with that later.

4d-6=18\\4d-6+6=18+6\\4d=24\\\frac{4d}{4}=\frac{24}{4}\\ d=6

  • Now, I'm going to bring back the inequality or < symbol. I only removed it when simplifying and isolating d, but if this confuses you, just do your math and keep the inequality there.

d < 6

  • On a number line, this would include every number <em>less than </em>6, due to the < (less than) symbol. This disqualifies answers b and d because they are showing every number <em>greater than </em>6. But, how do we decide between answers a and c?
  • If a line has point at its beginning, 6, then that means that every number <em>less than or equal to</em> [ ≤ ] 6 is being shown, but our equation just says <em>less than </em>[ < ] 6, so answer a is our correct answer.
4 0
3 years ago
Read 2 more answers
Darnell has
irinina [24]

Answer:

the answer is 28

Step-by-step explanation:

345÷12=28.75

you can't have a 0.75 shirt

7 0
3 years ago
Read 2 more answers
Other questions:
  • Use mental math to solve the equation 1.60=0.04+s
    13·2 answers
  • Students at a private liberal arts college are classified as being freshmen, sophomores, juniors, or seniors, and also according
    6·1 answer
  • Help pleaseeeeeeeeeeee
    7·1 answer
  • At 8:00 the temperature was 6 degrees celsius (*
    6·1 answer
  • Help me plz i cant do it
    15·2 answers
  • Explore the difference between volume and pitch as well as what causes them.
    8·1 answer
  • If the mean, median, and mode are all the same for 4, 9, 7, 8, and x, what is the value of x?​
    15·1 answer
  • Change both fractions to improper fractions. Then, do KCF.<br><br> I NEED HELP
    5·1 answer
  • Line /1 and line /2 are parallel line
    8·1 answer
  • Find the sine of ∠W.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!