what are the advantages of flow chart over algorithm?

by Guest11315170  |  10 years, 8 month(s) ago

1 LIKES UnLike

what are the advantages of flow chart over algorithm?

 Tags: advantages, Algorithm, Chart, flow



  1. Ali Abdullah
    Hi there, ALGORITHM :3. ALGORITHM To write the logic and method(s) to solve the problem in the procedural steps is called Algorithm. Algorithm in a step by step procedure to solve a given problem. Important characteristics of algorithms :- i. Algorithm are well defined. ii. Algorithm produce a result. iii. Algorithm halt in a finite amount of time. Slide 3:Advantages of Algorithms : i) Algorithms are independent of any computer language. ii) Algorithms are easy iii) To debug, since every step has got its own logical sequence. iv) Algorithms can be easily converted into flowcharts and then into computer programs. Slide 4:Example : To give 5 grace marks in a paper Steps : Record NAME,ROLL NUMBER, MARKS Add 5 to MARKS AND ASSIGN TO NEW- MARKS (NEW-MARKS = MARKS+5) Display NAME,ROLL NUMBER, MARKS, NEW-MARKS Stop FLOW CHARTS :FLOW CHARTS A program flowchart pictures the sequence of instructions for solving a particular problem. It gives a pictorial representation of data processing procedure. Slide 6:Advantages of Program flowchart :- i) It is usually much easier to draw a flowchart of a problem and then to write program directly. Flow-charts are an important aid in the development of the algorithm itself. Easier to understand than a program itself. Independent of any particular programming languages. It saves the time in writing the program. It saves the computer times also. Slide 8:Example – 1 : To compute the average of three numbers. Algorithm : 1. INPUT A, B, C 2. D = (A+B+C) / 3 3. OUTPUT D 4. STOP Flow-Chart : :Flow-Chart : START INPUT A,B,C D = (A+B+C)/3 OUTPUT D STOP Example - 2 :Example - 2 To find the biggest of the two numbers Algorithm : INPUT A,B IF A > B THEN OUTPUT A ELSE OUTPUT B 3. STOP Flow-chart :Flow-chart YES NO START INPUT A,B OUTPUT - A OUTPUT - B A>B STOP Example – 3 Flow-chart – (A) :Example – 3 Flow-chart – (A) Flow-chart (B) :Flow-chart (B) START Slide 14:Example – 4 BONUS – Calculation : BONUS= 8% of SALARY Employees SALARY is given Algorithm :- Procedural Steps Step 1 :- Obtain employee’s SALARY Step 2 :- Calculate BONUS = 8% * SALARY Step 3 :- Record SALARY, BONUS Step 4 :- STOP Slide 16:Example – 5 : BONUS = 8% of SALARY If YEAR ? 10, additional BONUS Rs. 50/- Algorithm :- Step 1 :- SALARY, YEAR Step 2 :- Calculate BONUS BONUS = 0.08 * SALARY Step 3 :- Check YEAR If YEAR ? 10 then BONUS = BONUS + 50 Step 4 :- OUTPUT SALARY, YEAR, BONUS Step 5 :- STOP Flow-chart :Flow-chart Slide 18:Example – 6 : If SALARY ? 10,000 then BONUS = 8 % of SALARY else BONUS = 300 Flow-chart :Flow-chart Slide 20:Example – 7 : SUM = 1+2+3+……… +20 Algorithm :- SUM = 0 K = 1 IF K > 20 THEN GO TO STEP 7 SUM = SUM + K K = K+1 GOTO STEP 3 OUTPUT SUM STOP Flow-chart :Flow-chart Example – 8 : Sum of odd numbers up-to NS1 = 1+3+5+7+ ……… + N Flow-chart :Example – 8 : Sum of odd numbers up-to NS1 = 1+3+5+7+ ……… + N Flow-chart Example – 9 : To find the largest among the give 100 numbersA(1), A(2), A(3) ……………………… A(100) Flow-Chart :Example – 9 : To find the largest among the give 100 numbersA(1), A(2), A(3) ……………………… A(100) Flow-Chart Example – 10 : Control by Trailer Record Flow-Chart :Example – 10 : Control by Trailer Record Flow-Chart Example – 11 : End of File. Flow-Chart :Example – 11 : End of File. Flow-Chart Example – 12 : By Tailor Record Flow-Chart :Example – 12 : By Tailor Record Flow-Chart Slide 27:Pseudo Codes :- It is combination of English phrases and programming constructs such as LET READ / WRITE IF – THEN – ELSE ETC. Slide 28:Pseudo Code specifics the steps required to accomplish task. The main purpose of a Pseudo Code is to define the procedural logic of a algorithm in a simple, easy – to –understand manner. The main advantage of Pseudo Code is that, because it is very English-like. You can share it with the non-programming user. Once you have understanding the purpose of the routine stated Pseudo Code, translating the Pseudo Code into actual program code is pretty simple. Slide 29:Examples – 1 IF SIDE A = SIDE B THEN SQUARE ELSE RECTANGLE Slide 30:Example – 2 BEGIN READ NUMBER1, NUMBER2 SUM = NUMBER1 + NUMBER2 WRITE SUM STOP END Decision Tables :Decision Tables Decision tables are a precise, yet compact way to model complicated logic. Decision tables, like if-then-else and switch-case statements, associate conditions with actions to perform. But unlike the control structures found in traditional programming languages, decision tables can associate many independent conditions with several actions in an elegant way. Decision tables are typically divided into four quadrants, as given below : Slide 32:Condition Stub : Which comprehensively lists the conditions. Action Stub : Which lists the action to be taken along the various program branches. Condition entries : Which lists in its various columns the possible permutations of answer to the questions in condition stub. Action entries : Which lists, it its columns corresponding to the condition entries the action contingent upon the set of answers to the questions of that columns. Slide 33:Example – A computer file has : Customer Name Type I & II Bill Number Bill Date Amount Date of payment Slide 34:Customer Type Type – I Type – II Payment < 30 days 10% Discount 12 ½ % Discount ? 30 and < 45 days 0% Discount 0% Discount and and Surcharge Surcharge 3. ? 45 days 10% Surcharge 12 ½ % Surcharge Hope it helps

Question Stats

Latest activity: 10 years, 8 month(s) ago.
This question has been viewed 3966 times and has 1 answers.

1 User is following this question



Share your knowledge and help people by answering questions.