SlideShare una empresa de Scribd logo
1 de 11
Presented By
        Abhishek Kumar
B.Tech,1st Sem.(Session-2010-11)
   Dept. Of CIVIL Engineering
       Mewar University
1.   SEQUENTIAL
2.   SELECTIONAL
3.   ITERATIONAL
   SEQUENTIAL CONSTRUCTS EXECUTE THE
    PROGRAM IN THE ORDER IN WHICH THEY
    APPEAR IN THE PROGRAM.
   ALGORITHM TO CALCULATE PERSENTAGE
    OF MARKS IN THREE SUBJECTS.

   STEP 1: START
   STEP 2:READ MARKS1,MARKS2, MARKS3
   STEP3: SUM=MARKS1+MARKS2+MARKS3
   STEP4: PERCENTAGE=(SUM*100)/300
   STEP5: DISPLAY PERCENTAGE
   STEP6: STOP
   SELECTIONAL CONSTRUCT CONTRPL THE
    FLOW OF STATEMENT EXECUTION IN
    ORDER TO ACHIEVE THE REQUIRED
    RESULT.
   ALGORITHM TO FIND WHEATHER ANUMBER IS
    ODD OR EVEN

   STEP 1: START
   STEP 2:READ NUMBER
   STEP3: IF NUMBER%2=0
                 DISPLAY EVEN
           ELSE
                 DISPLAY ODD
   STEP6: STOP
   ITERATIONAL ARE USED WHEN A PART OF
    THE PROGRAM IS TO BE EXECUTED
    SEVERAL TIMES.
   ALGORITHM TO PRINT A TABLE OF A NUMBER

   STEP 1: START
   STEP 2:READ NUMBER
   STEP3:COUNTER=1
   STEP4: DISPLAY PRODUCT=NUMBER*COUNTER
   STEP5:COUNTER=COUNTER+1
   STEP6:IF (COUNTER<=10) THEN GO TO STEP3
   STEP6: STOP
   ALGORITHM TO FIND AVERAGE AND
    WHEATHER STUDENT IS PASSED OR FAIL FOR
    N STUDENTS

   STEP1:START
   STEP2:READ NUMBER OF STUDENTS
   STEP3:COUNTER=1
   STEP4:READ MARKS1,MARKS2,MARKS3
   STEP5:SUM=MARKS1+MARKS2+MARKS3
   STEP6:PERCENTAGE=(SUM*100)/300
 STEP7:IF (PERCENTAGE>=65) THEN
              DISPLAY PASSED
        ELSE
               DISPLAY FAIL
 STEP8:COUNTER=COUNTER+1
 STEP9:IF(COUNTER<=NO. OF STUDENTS)
           THEN GO TO STEP3
 STEP10:STOP
Ak different patterns in algorithms

Más contenido relacionado

La actualidad más candente

Spl prelim lab 2011 2012
Spl prelim lab 2011 2012Spl prelim lab 2011 2012
Spl prelim lab 2011 2012Binsent Ribera
 
Alg II 2-5 Linear Models
Alg II 2-5 Linear ModelsAlg II 2-5 Linear Models
Alg II 2-5 Linear Modelsjtentinger
 
lesson plan 1 maya 3
lesson plan 1 maya 3lesson plan 1 maya 3
lesson plan 1 maya 3Max Friel
 
Algorithm Homework2
Algorithm Homework2Algorithm Homework2
Algorithm Homework2Sophia Tseng
 
Midsquare method- simulation system
Midsquare method- simulation systemMidsquare method- simulation system
Midsquare method- simulation systemArman Hossain
 
Approximation and error
Approximation and errorApproximation and error
Approximation and errorrubenarismendi
 
2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problemFrankie Jones
 

La actualidad más candente (9)

Spl prelim lab 2011 2012
Spl prelim lab 2011 2012Spl prelim lab 2011 2012
Spl prelim lab 2011 2012
 
Alg II 2-5 Linear Models
Alg II 2-5 Linear ModelsAlg II 2-5 Linear Models
Alg II 2-5 Linear Models
 
lesson plan 1 maya 3
lesson plan 1 maya 3lesson plan 1 maya 3
lesson plan 1 maya 3
 
Algorithm Homework2
Algorithm Homework2Algorithm Homework2
Algorithm Homework2
 
Midsquare method- simulation system
Midsquare method- simulation systemMidsquare method- simulation system
Midsquare method- simulation system
 
Approximation and error
Approximation and errorApproximation and error
Approximation and error
 
2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem
 
Cause effect graphing.ppt
Cause effect graphing.pptCause effect graphing.ppt
Cause effect graphing.ppt
 
Aslam
AslamAslam
Aslam
 

Similar a Ak different patterns in algorithms

ALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSKate Campbell
 
Algorithms and flowcharts ppt (seminar presentation)..
 Algorithms and flowcharts  ppt (seminar presentation).. Algorithms and flowcharts  ppt (seminar presentation)..
Algorithms and flowcharts ppt (seminar presentation)..Nagendra N
 
Logic Development and Algorithm.
Logic Development and Algorithm.Logic Development and Algorithm.
Logic Development and Algorithm.NandiniSidana
 
2. data types, variables and operators
2. data types, variables and operators2. data types, variables and operators
2. data types, variables and operatorsPhD Research Scholar
 
Sachin Foujdar , BCA Third Year
Sachin Foujdar , BCA Third YearSachin Foujdar , BCA Third Year
Sachin Foujdar , BCA Third YearDezyneecole
 
Aco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteAco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteIAEME Publication
 
Aco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteAco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteIAEME Publication
 
Aco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteAco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteIAEME Publication
 
Algorithm & Flowchart
Algorithm & FlowchartAlgorithm & Flowchart
Algorithm & FlowchartMegha Sharma
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and FlowchartsDeva Singh
 
01 Algorithms And Flowcharts.ppt
01 Algorithms And Flowcharts.ppt01 Algorithms And Flowcharts.ppt
01 Algorithms And Flowcharts.pptFerdieBalang
 
Ch02 primitive-data-definite-loops
Ch02 primitive-data-definite-loopsCh02 primitive-data-definite-loops
Ch02 primitive-data-definite-loopsJames Brotsos
 
Unit 1 algorithms practise
Unit 1 algorithms practiseUnit 1 algorithms practise
Unit 1 algorithms practiseDr Piyush Charan
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1rajnidhiman
 

Similar a Ak different patterns in algorithms (20)

ALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTS
 
Algorithms and flowcharts ppt (seminar presentation)..
 Algorithms and flowcharts  ppt (seminar presentation).. Algorithms and flowcharts  ppt (seminar presentation)..
Algorithms and flowcharts ppt (seminar presentation)..
 
LMmanual.pdf
LMmanual.pdfLMmanual.pdf
LMmanual.pdf
 
Logic Development and Algorithm.
Logic Development and Algorithm.Logic Development and Algorithm.
Logic Development and Algorithm.
 
Cp manual final
Cp manual finalCp manual final
Cp manual final
 
2. data types, variables and operators
2. data types, variables and operators2. data types, variables and operators
2. data types, variables and operators
 
Sachin Foujdar , BCA Third Year
Sachin Foujdar , BCA Third YearSachin Foujdar , BCA Third Year
Sachin Foujdar , BCA Third Year
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
Aco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteAco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suite
 
Aco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteAco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suite
 
Aco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suiteAco based solution for tsp model for evaluation of software test suite
Aco based solution for tsp model for evaluation of software test suite
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Algorithm & Flowchart
Algorithm & FlowchartAlgorithm & Flowchart
Algorithm & Flowchart
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Penyelesaian masalah
Penyelesaian masalahPenyelesaian masalah
Penyelesaian masalah
 
01 Algorithms And Flowcharts.ppt
01 Algorithms And Flowcharts.ppt01 Algorithms And Flowcharts.ppt
01 Algorithms And Flowcharts.ppt
 
Ch02 primitive-data-definite-loops
Ch02 primitive-data-definite-loopsCh02 primitive-data-definite-loops
Ch02 primitive-data-definite-loops
 
Unit 1 algorithms practise
Unit 1 algorithms practiseUnit 1 algorithms practise
Unit 1 algorithms practise
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 

Ak different patterns in algorithms

  • 1. Presented By Abhishek Kumar B.Tech,1st Sem.(Session-2010-11) Dept. Of CIVIL Engineering Mewar University
  • 2. 1. SEQUENTIAL 2. SELECTIONAL 3. ITERATIONAL
  • 3. SEQUENTIAL CONSTRUCTS EXECUTE THE PROGRAM IN THE ORDER IN WHICH THEY APPEAR IN THE PROGRAM.
  • 4. ALGORITHM TO CALCULATE PERSENTAGE OF MARKS IN THREE SUBJECTS.  STEP 1: START  STEP 2:READ MARKS1,MARKS2, MARKS3  STEP3: SUM=MARKS1+MARKS2+MARKS3  STEP4: PERCENTAGE=(SUM*100)/300  STEP5: DISPLAY PERCENTAGE  STEP6: STOP
  • 5. SELECTIONAL CONSTRUCT CONTRPL THE FLOW OF STATEMENT EXECUTION IN ORDER TO ACHIEVE THE REQUIRED RESULT.
  • 6. ALGORITHM TO FIND WHEATHER ANUMBER IS ODD OR EVEN  STEP 1: START  STEP 2:READ NUMBER  STEP3: IF NUMBER%2=0 DISPLAY EVEN ELSE DISPLAY ODD  STEP6: STOP
  • 7. ITERATIONAL ARE USED WHEN A PART OF THE PROGRAM IS TO BE EXECUTED SEVERAL TIMES.
  • 8. ALGORITHM TO PRINT A TABLE OF A NUMBER  STEP 1: START  STEP 2:READ NUMBER  STEP3:COUNTER=1  STEP4: DISPLAY PRODUCT=NUMBER*COUNTER  STEP5:COUNTER=COUNTER+1  STEP6:IF (COUNTER<=10) THEN GO TO STEP3  STEP6: STOP
  • 9. ALGORITHM TO FIND AVERAGE AND WHEATHER STUDENT IS PASSED OR FAIL FOR N STUDENTS  STEP1:START  STEP2:READ NUMBER OF STUDENTS  STEP3:COUNTER=1  STEP4:READ MARKS1,MARKS2,MARKS3  STEP5:SUM=MARKS1+MARKS2+MARKS3  STEP6:PERCENTAGE=(SUM*100)/300
  • 10.  STEP7:IF (PERCENTAGE>=65) THEN DISPLAY PASSED ELSE DISPLAY FAIL  STEP8:COUNTER=COUNTER+1  STEP9:IF(COUNTER<=NO. OF STUDENTS) THEN GO TO STEP3  STEP10:STOP