469,306 Members | 1,712 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,306 developers. It's quick & easy.

how to write algorithm?

10
Can someone tell me how to write an algorithm?
How algorithm look like?
Sep 11 '07 #1
7 29050
sicarie
4,677 Expert Mod 4TB
Can someone tell me how to write an algorithm?
How algorithm look like?
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.

Do you have a specific issue in mind? We'd be more than happy to help you break it down.
Sep 11 '07 #2
isaac86
10
can u post me some example???
so i can try to do on myself.
Sep 11 '07 #3
sicarie
4,677 Expert Mod 4TB
can u post me some example???
so i can try to do on myself.
Quickly, the best reference I can point you to would be Banfa's Tutorial over in the C/C++ Articles Section.

Other than that, I'd recommend looking at the threads with the high reply count - they usually have some sort of "inner-workings" problem that requires an examination of the algorithm.
Sep 11 '07 #4
JosAH
11,448 Expert 8TB
can u post me some example???
so i can try to do on myself.
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 (they can't bake cakes though).

kind regards,

Jos
Sep 11 '07 #5
isaac86
10
tq guy for urs information.
Sep 11 '07 #6
JosAH
11,448 Expert 8TB
tq guy for urs information.
You're extremely new to programming aren't you? How do you want to go on from here?
Are you going to study the C/C++ programming language or what? Maybe Java
would be a better language to start with (it's much simpler and a bit cleaner than
C or C++).

kind regards,

Jos
Sep 11 '07 #7
weaknessforcats
9,208 Expert Mod 8TB
Writing an algorithm is documenting the steps to follow without concern for the kind of data or the programming language.

Example: Find the length of a string
Algorithm: Beginning with the first element of the string, increment a total count until you have counted the last element of the string.
Sep 11 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

17 posts views Thread by savesdeday | last post: by
74 posts views Thread by lovecreatesbeauty | last post: by
1 post views Thread by sivaprasadreddy | last post: by
6 posts views Thread by kamsmartx | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.