What is the defination of algorithm and program - Tech students

What is the defination of algorithm and program

Defination of Algorithm

Defination of Algorithm
Defination of Algorithm

Algorithm is defined as a bit-by-bit procedure for determination a retardant.
Algorithm could be a set of steps that square measure followed so as io solve a mathematical downside.
Algorithm could be a step by step procedure expressed in English like language with a group of words and symbols to unravel a retardant and which might be born-again later into a computer virus.

Example : The sum of two numbers.

Step 1. Start
Step 2. Read data
              Input x, y
Step 3. Find sum
             s <-- x + y
Step 4. Print results
              Output x, y, s
Step 5. Stop.

Characteristics of Algorithm and Program

Properties of an Algorithm: every algorithmic program ought to have the subsequent four characteristics, solely then it's aforementioned to be an entire algorithmic program. They are

  • Finiteness : associate algorithmic program ought to terminate when a finite numbers of steps.
i.e. One or additional directions shouldn't be continual infinitely.

  • Definiteness : every step in algorithmic program is unambiguous. this suggests that the action specified by the step cannot result in multiple solutions and might be performed with none Confusion.

 i.e. every and each instruction ought to be clear and will have only 1 which means.

  • Input/Output: associate algorithmic program ought to settle for zero or additional inputs supported the problem being resolved. however it ought to turn out a minimum of one output.

 i.e. when the intrusions square measure dead, the user ought to get the specified results

  • Effectiveness : It consists of basic directions that square measure realizable. this suggests that the directions will be performed by victimization the given inputs in a very finite quantity of your time.

i.e. every instruction ought to be performed in finite time.

 A computer virus, or simply a program, is outlined as a sequence of instruction written to perform a nominal task with a laptop.

The set of directions square measure written in a very explicit computer programing language such as C, C++.C# FORTRAN, COBOL etc.

 The program auctions vary supported the pc artificial language used.

The program has got to be compiled and dead by the pc to urge the work done.

Example: the pc program written in C language for the on top of algorithmic program is as shown below.

Code :
int main()
 int x, y, s;
 s = x+y;
 printf("sum of %d and %d is %d \n", x,y,s);

I hope you my dear friends your find here the defination of Algorithm...comment below ..Thanks for visit us.

What is the defination of algorithm and program What is the defination of algorithm and program Reviewed by Tech students on January 12, 2019 Rating: 5

No comments:

Powered by Blogger.