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
eimsori [14]
3 years ago
11

In a List of Positive Integers, Set MINIMUM to 1. For each number X in the list L, compare it to MINIMUM. If X is smaller, set M

INIMUM to X.” Read this STATEMENT very carefully and Answer the below Questions.
A. Will this Algorithm RUN?? Yes or No with a justification

B. Will X Replace Any Value or Not?
Computers and Technology
1 answer:
Dvinal [7]3 years ago
4 0

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The given problem scenario is:

In a List of Positive Integers, Set MINIMUM to 1. For each number X in the list L, compare it to MINIMUM. If X is smaller, set MINIMUM to X.

The answer to question A is: this algorithm will not run because:

If you a list of a positive number and you have already set it MINIMUM to 1, the comparison result with MINIMUM will not obtain. For example, lets suppose a list of numbers L. L={1,2,3,1,1,5,4,3,2}. You have already set the Minimum to 1. When you compare each number X in the list, if X >MINIMUM, then set MINIMUM to X.  

This will not work, because there are positive numbers in the list and the minimum positive number is 1. So the algorithm, will not execute the if-part.

In short, the pseudo-code of this problem is given below:

<em>L={list of positive number e.g. 1,2,3,.......Xn}</em>

<em>MINIMUM=1</em>

<em>foreach ( X in L)</em>

<em>{</em>

<em>(if X<MINIMUM)</em>

<em>    { </em>

<em>        MINIMUM=X</em>

<em>    }</em>

<em>}</em>

The answer to question B is X will not be replaced because X  replaced with MINIMUM only when if-part of this algorithm get executed. However, it is noted that X will not replace any value, if if-part will get executed, the Variable MINIMUM will get replaced with any value.

You might be interested in
I neeeeed a girl that is looking for true love, trust me i will love her
nignag [31]

Answer:

sure!

Explanation:

4 0
2 years ago
Read 2 more answers
What is 4991 rounded to the nearest thousand
evablogger [386]

Answer:

5000

Explanation:

5 0
3 years ago
Read 2 more answers
Given the code as follows: main() { int i = 3, n; float x; x = i; n = 8 % x; } What problem will occur? Group of answer choices
Bess [88]

Answer:

A compilation error will occur.

Explanation:

The % operator does not accept a float as its right-hand operand.

7 0
3 years ago
The sequence &lt; un &gt; is defined by the recurrence Un+1 = 3Un+1\5Un+3 initial condition of u1 = 1: Need to show un in terms
Sholpan [36]
Sorry but your notation is ambiguous 

Is it U(n+1) = (3U(n) + 1)/(5U(n) + 3) 

or U(n+1) = (3U(n) + 1)/(5U(n)) + 3 

or U(n+1) = 3U(n) + (1/5U(n)) + 3 

or U(n+1) = 3U(n) + (1/5)U(n) + 3? 

<span>If so, what do you wish us to do with this sequence?

I hope my answer has come to your help. Thank you for posting your question here in Brainly. We hope to answer more of your questions and inquiries soon. Have a nice day ahead!
</span>
6 0
3 years ago
Which of the following qualifies as a teamwork skill? A. Free associating B. Multitasking C. Listening D. Problem solving
NeX [460]

There are certain skills that are required to be a good team member or team leader. A main characteristic of the required skills would be those that can be used in interacting with other people, since that is a main feature when working in teams.

From the given options, only one skill would be most suitable to be used when dealing with other people, which is (C) listening.  

4 0
3 years ago
Other questions:
  • PLEASE HELP ON THESE 3!! ILL GIVE A BRAINLIEST IF ITS CORRECT!!
    7·1 answer
  • The sum of all the minterms of a boolean function of n variables is equal to 1.
    7·1 answer
  • You are to create a program using Python that asks the user for a nonnegative number, then computes the mean and variance using
    15·1 answer
  • DLucy is planning to launch her podcast on career guidance for college students and has already recorded a few videos for market
    10·1 answer
  • How do I connect my CSS file and HTML page together? it's just not wanting to work for me. I have 3 other HTML pages that have t
    12·1 answer
  • ____ devices are high-performance storage systems that are connected individually to a network to provide storage for the comput
    12·1 answer
  • Write a program that reads in an integer, and breaks it into a sequence of individual digits. Display each digit on a separate l
    14·1 answer
  • A goal should be___.
    10·2 answers
  • How to transfer bookmarks to new computer
    15·1 answer
  • Who designed the Analytical Engine in the 1830s? Alan Turing Alan Turing Charles Babbage Charles Babbage Bill Gates Bill Gates S
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!