answersLogoWhite

0


Best Answer

No. An algorithm is a procedure or formula for solving a problem: a finite series of computation steps to produce a result. Some algorithms require one or more loops, but it is not true that every algorithm requires a loop.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

No.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Must a computer algorithm contain a loop?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is nesting in computer science?

Nesting is the process of organizing information in layers. For an example, a loop in a program can contain another loop which can contain yet another loop. This is called nested loops.


How can I proof about correctness of Square-and-multiply algorithm?

Using loop invariant.


C program algorithm for simple interest using while loop?

Not used


Write a algorithm for multiplication tabel for an integer?

Algorithm: 1. From the user collect the integer whose table is required 2. Use a loop with loop counter starting with 0x01 and ends till the table value is required 3. start multiplication the input number with the loop variable and print the result.


What is computing in science?

Nesting is the process of organizing information in layers. For an example, a loop in a program can contain another loop which can contain yet another loop. This is called nested loops.


How is time complexity of an algorithm calculated?

The usual definition of an algorithm's time complexity is called Big O Notation. If an algorithm has a value of O(1), it is a fixed time algorithm, the best possible type of algorithm for speed. As you approach O(∞) (a.k.a. infinite loop), the algorithm takes progressively longer to complete (an algorithm of O(∞) would never complete).


In the bubble sort algorithm the second loop iterates ---------- for each of the unsorted array elements?

n-1 times


Write an algorithm or draw a flowchart to display numbers from 100 down to 10?

n=100 loop until n = 9 print n n = n -1 end loop


What are the conditions of oscillations?

You must have a feedback loop, the loop gain must be equal to unity (1), and there must be 0 or integer multiple of 360 degrees.


C program find magic number less than 1000?

#define int main (void){/*Algorithm*/1. First Initialize the number that is Random no2. Using while loop if the person got it, then the loop stop if not the loop continues.}return(0);


How do you fix an infinite loop?

It comes from its name: it doesn't terminate, the user have to interrupt the program-run (in the worst case: power off the computer).The infinite loop is also used to program loops with non-easily-deterministically end-of-loop conditions.You write an infinite loop, such as for (;;) {statements}, and break out of the loop with the break statement when ready to terminate.


How do you get the square roots using algorithm?

An algorithm is process or set of rules for doing something If we are looking for square rots which are integers then an algorithm might look like this Put the number whose root is sought into a variable - the dividend. Put 2 into a variable - the divisor Begin a loop divide the dividend by the divisor put the result into a variable - the quotient if the quotient = the divisor then the quotient is the square root of the divident else, add 1 to the divisor next loop