answersLogoWhite

0


Best Answer

for the most part, programming is writing algorithms. An algorithm is just a sequence of instructions designed to get a desired result.

lets write an algorithm for finding the largest number in a list of numbers:

You have a list called numberList and it has a bunch of random numbers stored in it. The only way you can find the largest number is if you go through every element in numberList. Since we don't know anything about any of the numbers in numberList (they could all be the same) lets just call the first element in the list our currentLargest. As we traverse through numberList, if we come across a number larger than our currentLargest then we assign the new number as our currentLargest. Once we have looked at every element in the numberList, our currentLargest should be the largest number in numberList.

The code for the above program would look something like this [Pseudocode]:

numberList = {1, 39, 8, 109, ...}

currentLarget = numberList0

FOR every element in numberList

. . . IF element > currentLargest

. . . . . . currentLargest = element

PRINT currentLargest

User Avatar

Wiki User

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

Wiki User

15y ago

An algorithm is a set of steps used to solve a specific problem. So in order to make one, you need to identify a problem and figure out a solution to that problem. Write down the solution in a step-by-step manner and you have yourself an algorithm.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

The process of writing an algorithm is just taking your problem, and breaking it down, abstracting it to be able to be solved without a computer. Then you can translate those steps into code.

Quickly, the best reference I can point you to would be Banfa's Tutorial

[ http://bytes.com/topic/c/insights/641516-tutorial-1-what-programming ]

over in the C/C++ Articles Section.

Have a look at a recipe for baking a cake; it's a set of instructions that you should

follow/perform in order to obtain a cake without buying one. Algorithms are

similar sets of instructions for computers.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

Any algorithm, that refers to itself is recursive.

Trivial example:

gcd (a, b) :=

a if b=0

b if a=0

gcd (a mod b, b) if a>=b

gcd (b mod a, a) if a<b

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

an algorithm is just a detailed sequence of simple steps thst are needed to solve a problem,

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

Algorithms are generally written on a piece of paper.

This answer is:
User Avatar

User Avatar

Wiki User

8y ago
  1. Natural language
  2. Flow chart
  3. Pseudocode
  4. Programming language

There is no fifth method.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the 5 ways of writing an algorithm?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is writing Code?

Writing code is the process of implementing an algorithm in a specific programming language.


What are the main steps involved in writing algorithm?

1 Define the problem 2 Analyze the problem 3 Develop an algorithm/method of solution 4 Write a computer program corresponding to the algorithm 5 Test and debug the program 6 Document the program (how it works and how to use it)


What are the ways representing an algorithm?

You can represent an algorithm by three different ways: 1. Pseudo Code 2. Structured flow charts 3. Actual code


What are the release dates for The Algorithm - 2013?

The Algorithm - 2013 was released on: USA: 5 April 2013


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)


What is the algorithm for multiplying fractions?

2 + 2 x 5 x 6 x 8 x 7 is the algorithm for that


Algorithm A completes 3 cycles in one minute. Each of Algorithm B and Algorithm C respectively completes 4 and 5?

The full Question...Suppose 3 algorithms are used to perform the same task for a certain number of cycles. Algorithm A completes 3 cycles in one minute. Each of Algorithm B and Algorithm C respectively completes 4 and 5 cycles per minute. What is the shortest time required for each Algorithm to complete the same number of cycles?


What is difference between alogrithm and pseudo code?

An algorithm is an abstract set of rules used to solve a specific problem. Pseudocode is just one of many ways to represent an algorithm.


Why should you develop a detailed algorithm for a program before writing down any assembly language instructions?

Because fuuck you !!


What are the ways in representing in algorithm?

pseudocode, flow charts, strewing the remains of a dead cat on a sidewalk. pick your poison.


What are the different ways of representing algorithms?

You can represent an algorithm by three different ways: 1. Pseudo Code 2. Structured flow charts 3. Actual code


What are the ways of writing a number?

alphabetically