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
I mainly need help with #10, thank you!
Masja [62]

Answer:

10) 40

Step-by-step explanation:

just subtract 95 and 55

8 0
3 years ago
The Jones family had two gallons of milk before breakfast. The family used two quarts of milk during breakfast. How many quarts
mixer [17]

Answer:

2

Step-by-step explanation:

3 0
2 years ago
can anyone help?????? Can y’all write it detailed or like step by step explaining cause i have to write it down ..
inysia [295]

Answer:

x = 5

Step-by-step explanation:

Step 1: Distributive property

Using this property means when you have something like the equation on the right side ( 4 ( x + 3 ) ) you multiply both the values in the parentheses by the number outside:

4 ( x + 3 )

( 4 x X ) + ( 4 x 3 )

4x + 12

8x + 2 = 2x + 4x + 12

Step 2: combine like terms

Combining like terms is when you find like terms with the same variables and such and add them together:

8x + 2 = 12 + ( 2x + 4x )

8x + 2 = 12 + 6x

Step 3:Using inverse operations

This means that you need to get a variable one one side and a constant on the other:

8x + 2 ( -2 ) = 12 ( -2 ) + 6x

8x = 10 + 6x

8x ( -6x ) = 10 + 6x ( -6x )

2x = 10

Step 4: solve for the variable

The last thing you need to do is divide both sides by the constant with the variable ( 2x ) to get x by itself:

2x ( /2 ) = 10 ( /2 )

x = 5

7 0
2 years ago
Read 2 more answers
Given h(x) = x2 – 5x + 7, find the following.<br> a. h(2)<br> b.h(-5)<br> c. h(-8)
azamat

Answer:

Step-by-step explanation:

hello :

h(x) = x² – 5x + 7

h(-2) = (-2)² – 5(-2) + 7 =4+10+7 =21

h(-5) = (-5)² – 5(-5) + 7= 25+25+7 =57

h(-8) = (-8)² – 5(-8) + 7 = 64+40+7=111

5 0
2 years ago
Is the value of 8 in 345,802 ten times greater or smaller than the value of 8 in 758,910
german

Answer:

Yes

Step-by-step explanation:

One is in the hundreds and one is in the thousands. 100x10=1000

7 0
2 years ago
Other questions:
  • Can u help me solve​
    13·1 answer
  • A rectangular painting by Leonardo da Vinci measured 62cm along its diagonal. If the painting has a height of 42 cm how wide is
    11·1 answer
  • Can u help me with this or I’m going to get in trouble !
    7·1 answer
  • Telescope: discount; 30% sale price, $126
    6·2 answers
  • What is the IQR (Inter Quartile Range) for the data set? 11 6 19 14 21 7 13 15 15 Question 10 options: 8 9 15 17
    7·1 answer
  • How can I divide 33 photos into two <br><br>groups
    10·1 answer
  • Find the slope of the line through<br> (-11,8),(-11, -17)
    10·1 answer
  • Find two positive numbers satisfying the given requirements. The product is 432 and the sum of the first plus three times the se
    6·1 answer
  • Find the area of the following rectangle.<br> length = 12 ft.<br> width = 8 ft.
    14·2 answers
  • Which has a larger area? A triangle with a base of 15ft and a height of 25
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!