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]
2 years ago
6

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

Mathematics
2 answers:
Crazy boy [7]2 years 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]2 years 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 every 1 girl in Mr hegarty’s class there are 2 boys. What is the ratio of girls to boys in the class? Give the answer in sim
svetoff [14.1K]
1:2 i believe good luck
8 0
3 years ago
Read 2 more answers
Please please help me out
masya89 [10]

Answer:  y = 3x + 1

<u>Step-by-step explanation:</u>

The equation is in Slope-Intercept format: y = mx + b      where

  • m is the slope <em>(difference in y's over difference in x's)</em>
  • b is the y-intercept   <em>(value of y when x = 0)</em>

m=\dfrac{y_2-y_1}{x_2-x_1}\\\\\\\text{Let }(x_1,y_1)=(0,1)\quad \text{and}\quad \text{let }(x_2, y_2)=(1,4)\quad then\\\\m=\dfrac{4-1}{1-0}=\dfrac{3}{1}=3

b = 1     <em>refer to the table that shows y = 1 when x = 0</em>

Now input m = 3 and b = 1 into the Slope-Intercept formula:

y = 3x + 1

8 0
3 years ago
What fraction is equivalent to 30/360?
Firdavs [7]

Answer:

1/12

Step-by-step explanation:

Given that

30/360 to lowest fraction equivalent

Now, we can write 30 as 3×10

Also, we can write 360 as 36×10

Then, we have

(3×10)/(36×10)

Then, 10 cancel 10, we are left with

3/36

Also we can write 36 as 12×3

Then, we have

3/(12×3)

Also, 3 cancel 3, we are left with

1/12

Then the lowest fraction is 1 / 12

1/12

4 0
3 years ago
Read 2 more answers
What is 1.950 as a mixed number
deff fn [24]
1.950= 1 95/100= 1 19/20
3 0
3 years ago
Can someone write it on paper so I can copy
Darina [25.2K]

Answer:

453/ 2 = 226.5 rounds to 227

672/ 5 = 134.4 rounds to 134

1,294/ 4 = 323.5 rounds to 326

Step-by-step explanation:

8 0
3 years ago
Other questions:
  • .The spin on a washing machine takes out 35% of the water in the clothes. The clothes in the washing machine contain 3 pints of
    11·1 answer
  • 15% of 9 dollars is how many dollars
    12·1 answer
  • Solve:<br><br> a.x3+x2-8x - 12x+2<br> b. x3-4x2-3x + 18x-3<br> c. x2 + 4x + 4<br> d. x2 - 6x + 9
    9·1 answer
  • 2. To the nearest cent, what is $57.10 decreased by 41%?
    14·1 answer
  • Use the standard normal table to find P(z ≥ 1.06). Round to the nearest percent.
    6·1 answer
  • I need help please, mutiply chose picking irrational number
    14·2 answers
  • What is the quotient of 33.288 and 7.6?<br>​
    11·1 answer
  • Helppp plsssss..ssssss
    11·1 answer
  • Help me pls pls pls pls
    14·1 answer
  • What is a translation (math)
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!