Presented By        Abhishek KumarB.Tech,1st Sem.(Session-2010-11)   Dept. Of CIVIL Engineering       Mewar University
1.   SEQUENTIAL2.   SELECTIONAL3.   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...
   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   ...
   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 PRO...
   ALGORITHM TO FIND AVERAGE AND    WHEATHER STUDENT IS PASSED OR FAIL FOR    N STUDENTS   STEP1:START   STEP2:READ NUM...
 STEP7:IF (PERCENTAGE>=65) THEN              DISPLAY PASSED        ELSE               DISPLAY FAIL STEP8:COUNTER=COUNTER...
Ak different patterns in algorithms
Upcoming SlideShare
Loading in …5
×

Ak different patterns in algorithms

293 views
144 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
293
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Ak different patterns in algorithms

  1. 1. Presented By Abhishek KumarB.Tech,1st Sem.(Session-2010-11) Dept. Of CIVIL Engineering Mewar University
  2. 2. 1. SEQUENTIAL2. SELECTIONAL3. ITERATIONAL
  3. 3.  SEQUENTIAL CONSTRUCTS EXECUTE THE PROGRAM IN THE ORDER IN WHICH THEY APPEAR IN THE PROGRAM.
  4. 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. 5.  SELECTIONAL CONSTRUCT CONTRPL THE FLOW OF STATEMENT EXECUTION IN ORDER TO ACHIEVE THE REQUIRED RESULT.
  6. 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. 7.  ITERATIONAL ARE USED WHEN A PART OF THE PROGRAM IS TO BE EXECUTED SEVERAL TIMES.
  8. 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. 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. 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

×