An algorithm is a step by step program solving procedure.It can be carried out by a computer.An algorithm is a set of rules or steps to solve a mathematical problem or computer program.Algorithm describe how people realise a problem.
Find a right may to solve it,analysis the available resources (data).Make an optimal solution and finally output the result.
A good algorithm should have the following properties :
1. It should be simple on possible.
2. Steps must be unambiguous.So that they are understood by the complex property.
3. It should be understood by other.
4. It must be effective to solve the required problem.
5. It must be able to find an optimal salvation.
6. It should have the capability to handle some unexpected situation during the problem solving.
ALGORITHM
Step-1: Total first division and total mark sheet checked to zero.
Step-2: Take the mark sheet to the next student.
Step-3: Check the division column of the mark sheet to see it is first.It no go step-5.
Step-4: Add 1 total first division.
Step-5: Add 1 total mark sheet checked.
Step-6: Is total mark sheet checked = 50?
It no go to step?
Step-7: Print total first division.
Step-8: Stop.
Pseudo code is an alternative of flow chart.It allows the programmer to describe the solution of a problem which may look like plain English.The reason for pseudo code in to represent the solution to any body without programming difficulties.
Input Number
WHILE Number <1 DO
Input Number
End WHILE
If the number %2 = 0 THEN
Print Even number
ELSE
Print Odd number
END IF
STOP.
include <stdio.h>
main ( )
{
Print f ("Hello world !");
Print f ("This is our first C program !");
Print f ("This is really a enjoyable moment !");
Return 0 ;
}
Include <stdio.h>
void main ( )
{
int a,b,sum;
a = 4 ;
b = 6 ;
Sum = a+b ;
Print f ("Result is % d", sum);
}
Find a right may to solve it,analysis the available resources (data).Make an optimal solution and finally output the result.
A good algorithm should have the following properties :
1. It should be simple on possible.
2. Steps must be unambiguous.So that they are understood by the complex property.
3. It should be understood by other.
4. It must be effective to solve the required problem.
5. It must be able to find an optimal salvation.
6. It should have the capability to handle some unexpected situation during the problem solving.
ALGORITHM
Step-1: Total first division and total mark sheet checked to zero.
Step-2: Take the mark sheet to the next student.
Step-3: Check the division column of the mark sheet to see it is first.It no go step-5.
Step-4: Add 1 total first division.
Step-5: Add 1 total mark sheet checked.
Step-6: Is total mark sheet checked = 50?
It no go to step?
Step-7: Print total first division.
Step-8: Stop.
Pseudo code is an alternative of flow chart.It allows the programmer to describe the solution of a problem which may look like plain English.The reason for pseudo code in to represent the solution to any body without programming difficulties.
Input Number
WHILE Number <1 DO
Input Number
End WHILE
If the number %2 = 0 THEN
Print Even number
ELSE
Print Odd number
END IF
STOP.
include <stdio.h>
main ( )
{
Print f ("Hello world !");
Print f ("This is our first C program !");
Print f ("This is really a enjoyable moment !");
Return 0 ;
}
Include <stdio.h>
void main ( )
{
int a,b,sum;
a = 4 ;
b = 6 ;
Sum = a+b ;
Print f ("Result is % d", sum);
}
No comments:
Post a Comment