answersLogoWhite

0

Give an example for algorithm

Updated: 4/28/2022
User Avatar

Wiki User

11y ago

Best Answer

Function mult

1.ans <- 0

2. For i=1 thru a by 1

a. Ans <- ans+b

3. Return (ans0

end mult

function raise

1.ans <-1

2.for i=1 thru b by 1

3.return (ans)

4.end raise

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Give an example for algorithm
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Give an example of a backtracking algorithm?

4d + 7 = -15


What is the example of finiteness in algorithm?

I've never heard the term "finiteness" applied to an algorithm, but I think that's because the definition of an algorithm includes that it must be finite. So think of any algorithm and there is your example of finiteness.


What is an intractable problem in computer limitations and can give the example?

An intractable problem is one for which there is an algorithm that produces a solution - but the algorithm does not produce results in a reasonable amount of time. Intractable problems have a large time complexity. The Travelling Salesman Problem is an example of an intractable problem.


Example of md5 algorithm?

fdf


Give you the algorithm of creating a new binary search tree using c?

i want to know how to give the algorithm password in a computer ?


Can you give a C program about SJF algorithm?

no.


What is an algorithn?

If you mean "Algorithm" an algorithm is simply a set of rules, or steps to complete, which are needed to solve a particular problem. An example would be a recipe in a cookbook. A recipe is an algorithm.


What is algorithm and what are its characteristics?

An "algorithm" is simply a method to solve a certain problem. For example, when you use the standard method you learned in school to write down two numbers, one beneath the other, then add them, you are using an algorithm - a method that is known to give correct results in this particular case.


Design an algorithm for finding all the factors of positive integerfor example in the case of the integer 12your algorithm should report 12346 and 12?

design an algorithm for finding all the factors of a positive integer


midpoint circle algorithm example in real life?

الزكاء الاصطناعي


Give time complexity expression for bellman-ford algorithm?

o(mn)


How do you write algorith of C programs?

There is no specific Hard and Fast rule for writing algorithm. The normal method is the following: 1. get a problem 2. find or invent an algorithm to solve it 3. implement the algorithm in a programming language (C, for example)