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
For the given linear function, what are the slope and y-intercept?
asambeis [7]

Answer:

The equation of any straight line, called a linear equation, can be written as: y = mx + b, where m is the slope of the line and b is the y-intercept. The y-intercept of this line is the value of y at the point where the line crosses the y axis.

Step-by-step explanation:

I had this question not to long ago and got it right

4 0
3 years ago
How many numbers are between 1 and 3 ?
kramer
If we are talking about whole numbers, the only number in between 1 and 3 is 2 but if we are talking about numbers in general, there are an infinite amount of numbers (for example, 1.1, 1.12, 1.004, and 1.80543285 are all in between 1 and 3).
5 0
3 years ago
Find the quotient of 1 1/4 and 3 1/2 express your answer in simplest form
natta225 [31]

Answer:

11/14

Step-by-step explanation:

11/4 / 3 1/2

3 1/2= 3*2+1= 6+1=7/2

11/4 * 2/7= 22/28

22/2=11

28/2= 14

11/14

4 0
3 years ago
Read 2 more answers
What is z over 3 = 20
atroni [7]

Answer:

z = 60

Step-by-step explanation:

z/3 = 20. (Multiply both sides by 3 to isolate ‘z’)

20 • 3 = 60

7 0
3 years ago
What’s the answer to this
Kryger [21]
C. Is the correct answer
6 0
3 years ago
Other questions:
  • Suppose f(x) is a function such that for some positive integer n, f has n linearly dependent derivatives. In other words, if f(x
    9·1 answer
  • Joe earns $9 per hour. He worked x hours on both Wednesday and Friday, and 8 hours on both Tuesday and Saturday. Write an expres
    7·2 answers
  • Write in simplest radical form: √208 Show all work.
    12·1 answer
  • What is the value of the expression, written in standard form?
    12·1 answer
  • Solve the equation for x. 8(2x − 6) = 96
    10·2 answers
  • Help me please with Ap calc ​
    7·1 answer
  • I giveeeeee brainlilsttt
    5·2 answers
  • Find the area of the shape below
    11·1 answer
  • Two Step Equation's and Inequalities -8=2-4y
    12·2 answers
  • The point (4, 5) is translated two units left and eight units down. What is the
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!