Computers and Technology

Write and algorithm that finds the smallest element in the sequence s1, s2,….,sn of n distinct numbers. the input is the sequence, s, and the index, n, of the last term of the sequence. the output is the index of the smallest element in the sequence. this is what i have. i know its wrong but i am just trying to understand it. input: s1,s2, : ? algorithm: 1. i=02. out=03. i = i +14. if out > i, out=i5. repeat 3 and 4 until i==n6. display the smallest number

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 16:30, nxusasmangaliso1191
The most common battery cable terminal is a that provides a large surface contact area with the ability to tighten the terminal onto the battery post using a nut and bolt.
Answers: 2
image
Computers and Technology, 22.06.2019 19:20, bob4059
1)consider the following code snippet: #ifndef book_h#define book_hconst double max_cost = 1000.0; class book{public: book(); book(double new_cost); void set_cost(double new_cost); double get_cost() const; private: double cost; }; double calculate_terms(book bk); #endifwhich of the following is correct? a)the header file is correct as given. b)the definition of max_cost should be removed since header files should not contain constants. c)the definition of book should be removed since header files should not contain class definitions. d)the body of the calculate_terms function should be added to the header file.
Answers: 1
image
Computers and Technology, 22.06.2019 23:30, elizabethburkha
Which text format is this, "the text is transcribed exactly as it sounds and includes all the utterances of the speakers. "?
Answers: 2
image
Computers and Technology, 22.06.2019 23:30, Molly666
What does 21 pilots middle aged name as a band 15 years prior to them naming their band 21 pilots?
Answers: 1
Do you know the correct answer?
Write and algorithm that finds the smallest element in the sequence s1, s2,….,sn of n distinct numbe...

Questions in other subjects:

Konu
Mathematics, 29.03.2021 15:50
Konu
Mathematics, 29.03.2021 15:50