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
1.4. Frederick works in a grocery store and also mows lawns. He earns $10 per hour a
dmitriy555 [2]

Answer: Im very sure the answer is

B

Step-by-step explanation:

5 0
3 years ago
Read 2 more answers
How many more people voted for the most popular color than for the least popular color
PilotLPTM [1.2K]

Answer:

24

Step-by-step explanation:

red is most popular with 33 votes. silver is least popular with 9 votes.

33 - 9

24

7 0
3 years ago
I need help please and i need work shown
velikii [3]

Answer:

<VUT = 50

Step-by-step explanation:

Tangent Chord Angle = 1/2 Intercepted Arc

< VUT = 1/2 (100)

<VUT = 50

3 0
3 years ago
Read 2 more answers
A quilter has square blocks of fabric. The area of each block is 36 in.2. The quilter decides to cut the squares along one diago
Lyrx [107]
I think the answer is H but I could be wrong
8 0
3 years ago
The cost of a plane ticket varies directly as the number of miles in the trip. A 3000 mile trip costs $400. What is the cost of
melisa1 [442]

Answer:

$60

Step-by-step explanation:

set up a proportion and cross-multiply:

3000/400 = cost/450

c = cost

3,000c = 180,000

c = 180/3

c = 60

6 0
3 years ago
Other questions:
  • What is a sum for 4/3.
    5·1 answer
  • A coin toss is used to determine which team will receive the ball at the beginning of a football game. The Cougars always choose
    11·1 answer
  • The dimension of an aquarium are 12 inches * 6 inches * 8 inches. The water in it has a height of 7 inches.
    8·1 answer
  • Two of the angles in a triangle measure 35 and 8. What is the measure of the third angle?
    14·1 answer
  • What is 27.3375% as a fraction?
    12·2 answers
  • 2i(4+5i)(4-5I)/4+i find the quotient and express it in its simplest form
    10·2 answers
  • Which proportion could be used to find the length of side b?
    9·2 answers
  • Can someone be kind enough and help me I've posted my question many times and no one has answered​
    13·1 answer
  • Please answer this ASAP
    10·1 answer
  • Given: Triangle ABC, AC=BC, AB=3, line segment CD is perpindicular to line segment AB, CD= sqrt 3 find AC
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!