






















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!























Dr. Fakhre Alam Khan MED UET Peshawar
Different advantages of computer program are as follows:
1. Logic Design - (^) In this part, the logic of the program is designed. We specify different steps required to solve the problem and the sequence of these steps. 2. Coding - (^) In this part, the algorithm is converted into a program. The steps of algorithm are translated into instructions of any programming language.
Example 2 The following algorithm inputs radius from the user and calculates the area of circle. (Hint: Area = 3.14 radius radius)
Example 3 The following algorithm calculates the distance covered by a car moving at an average speed of V m/s in time T. It should input average speed v and time t. (Hint: s = v*t , where s is the distance traveled).
Some advantages of algorithm are as follows:
1. Reduced Complexity Writing algorithm and program separately simplifies the overall task by dividing it into two simpler tasks. While writing the algorithm, we can focus on solving the problem instead of concentrating on a particular language. 2. Increased Flexibility Algorithm is written so that the code may be written in any language. Using the algorithm, the program could be written in Visual Basic, Java or C++ etc. 3. Ease of Understanding lt is not necessary to understand a particular programming language to understand an algorithm. It is written in an English like manner.
Input / Output
Process
Start / End
Connector