WHAT IS AN ALGORITHM?
To make a computer do anything, you have to write a computer program. To write a computer program, you have to tell the computer, step by step, exactly what you want it to do. The computer then "executes" the program, following each step mechanically, to accomplish the end goal.
When you are telling the computer what to do, you also get to choose how it's going to do it. The algorithm is the basic technique used to get the job done. Let's follow an example to help get an understanding of the algorithm concept.
Let's say that you have a friend arriving at the airport, and your friend needs to get from the airport to your house. Here are four different algorithms that you might give your friend for getting to your home:
The taxi algorithm:
The call-me algorithm:
When you are telling the computer what to do, you also get to choose how it's going to do it. The algorithm is the basic technique used to get the job done. Let's follow an example to help get an understanding of the algorithm concept.
Let's say that you have a friend arriving at the airport, and your friend needs to get from the airport to your house. Here are four different algorithms that you might give your friend for getting to your home:
The taxi algorithm:
- Go to the taxi stand.
- Get in a taxi.
- Give the driver my address.
The call-me algorithm:
- When your plane arrives, call my cell phone.
- Meet me outside baggage claim.
mailing an envelope
- USER GETTING THE INPUT AND DISPLAYING THE OUTPUT IS REPRESENTED USING PARALLELOGRAM SYMBOL.