algo-flow-chart

Algorithm and Flowchart

Algorithm:

  • An algorithm (pronounced AL-go-rith-um) is a well defined  procedure or formula for solving a problem
  • An algorithm is a set of rules for solving a problem in a finite number of steps
  • An algorithm is a sequential procedure that takes some values or set of values as an input and produce some values or set of values as output
  • An algorithm is a step-by-step set of procedure to accomplish a particular task

Characteristics of an Algorithm:

The characteristics of a good algorithm are:

  • PrecisionEach and every instruction should be precise and unambiguous i.e. each and every instruction should be clear and should have only one meaning
  • Uniqueness – results of each step are uniquely defined and only depend on the input and the result of the preceding steps.
  • Finiteness – the algorithm stops after execution of a finite number of instructions
  • Input – the algorithm receives zero or more inputs.
  • Output – the algorithm produces output at least one output.
  • Generality – the algorithm applies to a set of inputs.

Development of Algorithm:

  • Each algorithm will start with START step and end with STOP step
  • READ or INPUT or ACCEPT are used to take the date from the user
  • To display any message or content of variable to the user PRINT or DISPLAY is used as the keyword.
  • following arithmatic operators are used in the expressions = assignment, + addition – subtraction *multiplication / division
  • In propositions following relational operators are used ‘>’ greater than ‘<’ less tha ‘>=’ greater than equal to ‘<=’  less than equl to ‘=’equality ‘!=’ not equal to
  • Logical operators are used as follows: ‘AND’ Conjunction  ‘OR’ disjunction ‘NOT’ Negation

 An algorithm to find out the sum of two numbers

 

Algorithm to compare two numbers and print the message for greater one:

 

An algorithm to check whether the number is even or odd:

 

Write an algorithm to find largest among three numbers:

Method-1

Method-2

Flow Chart:

  • Flowchart is the pictorial/graphical representation of an algorithm.
  • Flowcharts comprises of a set of various standard shaped boxes that are interconnected by flow lines.
  • Flow lines have arrows to indicate the direction of the flow of control between the boxes.
  • The activity to be performed is written within the boxes in English

Symbols used in the flow Charts:

flow_chart

 Types of flow chart:

  1. Document flow chart: Showing the controls over a document flow through a system
  2. Data flow chart:  Showing control over the data flow in the system.
  3. system flow chart: Showing the control over the physical or resource level
  4. program flow chart:  Showing the controls in a program with a system

Write and algorithm and draw the flow chart for finding the sum and product of two numbers:

Algorithm

 

Flow Chart

zVjbU+o8EP9rePlmP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0nenLo6RY6dgoKa51J4gSqJavbHn38h3Vmb0C

Write and algorithm and draw the flow chart for finding the sum of first 10 natural  numbers:

Algorithm

 

Flow Chart

3Vlbc5s4FP41fkyHS3DsxzhNd/tQN1N3Z7ePMsigiUCMwLHTX98jc8RNEF9jMsuDLR0JXb7znYvQyH2It39JkkbfRED5yLGC7cj9PHKcycSCXyV4LQS3DgpCyYJCZFeCBftNUai7rVlAs0bHXAies7Qp9EWSUD9vyFaCN6dISaiHrwQLn3BT+i8L8gj34Iwr+d+UhZGexh5Pi5Yl8Z9DKdYJzpeIhBYtWf6qRw/oiqx5frMTQZtqjomeBfe7tYoqPIXgVQtwqpQkjcX+FiJuCCTNShRx0BXDFWN9KWRAJY6LMs6S5zqk7iNoVQoBb6pSvH2gXGlWa6147UtPa4mkpElj7r4XcLcvhK9x7Yuf9z9+GiDCW6B6qMw2EcvpIiW+atkA+UAW5TGHmg3FpRrIWASu64XKnCJFq90Ch6mIaS5flSKKVlfjjvx1Ea5NxQ9bQxjVuOGhjCCmYTlyBQIUEIduTNwOTL4/nQ6JpMFFEJk0EPHGqLtrQHJrQGLCkQT3UooN1HxOsoz5TRR6IaBBwzuYANQ2qPfStT9JOcnZS9OndG0aZ3gSDFZS4TtpMk57UD1CJtbSp/hS3aL2jGNbWNcD5USGNDcGAvCI2q3ulqoOmaGkEpeD9HZnUvmfbyNnTGLFUQ4Izm6g/Qb3WlPnHk4LSRJQ2+VpbdsH0vr2ArS2TVOfw9985MxwI0Mgon0dIuJ4aH1XQWRQS+8zoSnWD/QERxj9tIW1xvUEq/80rj13iGNbh0M4AdszdPr04+scgrxVeIOdH1hKKIWqZCg8i0iqiqBSwjnlIpQEkp99cS+UlCaXMAhNbB35rAMNQhvSWQaBSeiHMghnio7r8gbRN9O5YdDVuA1iAWYcHF6Jt3dmpHsfJZYznatEz2qlVVdVIiYKrWA9YOrSCtT25JqpC2rmYwVq71qULmc6Oz2fDEhpTY5Wfu5+3sXlGeShH4TaroM5xDWoXS63QuXrwkxTlPGrz1V70xcZiXi5hgXtS1jStUzhpUtkLM1DjdsRr/X5so5e+8x5EnrmJ50hHEMLgPH7JSw9Mx3vGNo6GzBh6fgGNbx391wc4N29eznT2QnLuLWWqyrxAmdpumX5f7sspyj/UuVP3lvqLbBqutIP8o3NnuJpSiemLtbPNVYj7hyt5+55yiNkueDCMPvW1e6v11WRqFjByZQyj/Lz7wapIEqpQFijUZZL8UwfBBfq+mF3TeLOVozzlohwFqp7Dh9IpW4qZirmMbipuceGmAWBmqYzlAroveI7MkfQDw7/b9D0iGhq4a61EvQX1Rpptf7rpG1/yzkpmprH/1+PkIz8zxGf4IFZI64v3PYh/oZH6EEcqtVtV2ER1YWm+/gH

 

 


Write and algorithm and draw the flow chart for finding larger between two  numbers:

 

Algorithm

 

 

Flow Chart

5Vpbd9o4EP41eWwOvmDgMeSym4emOUl3t31UsGJ8IiwqTC799R3hGduSTLgZaLY8gDWWZ6RvLpoZfBKcT17/Umw6/ixjLk78Tvx6Elyc+H6/34FvTXgrCKGPhESlcUHyKsJ9+pMjkabN05jPjIm5lCJPpyZxJLOMj3KD9iiFKWLKEmJfEe5HTLjU/9I4H+Me/Kii/83TZExivGhQ3Hlgo6dEyXmG8jKZ8eLOLH8j7jF/ZHORf1qQ4J6+PWEkBff72qH944w3JOBwyjJjrT+lnBgExWcliMjzMcUF4/hBqpgrZIs0kWZPdUSDS1CqkhKe1FeT13MutGJJacVjV0vulkAqnhmylz2Au3tmYo5rv/96dvfVwRCeAs3DYPgyTnN+P2UjfecFbA9o43wiYOTB5YNm5CwC1/XMVc7RQqvdgglzOeG5etN6KO4GPmoYzTcoRi+VdXiE4LhmGX6voDGENCkZVxjABcLQDAmKMiD5crs9IorHrQDSNwAJe6i6VZB0kbYLJKEDiQtHFp8pJV9gNBJsNktHJgpLIeCxERtcAGobpL007U9xwfL02YwoTZtGCbcyhZVU+PZNg+sj3MRhJudqxPGhukOt4ON5lknmTCU8dxgBeEzvlqZN9YSZo6QSl7X05h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ks5c7layKrXh3ZohcAw+rlpQLH6vW04PIX


Write and algorithm and draw the flow chart for checking a number is Even or Odd  

Algorithm

 

Flow Chart

3VlLc+M2DP41PjZjSY4fxyT1tntwkom30+6RlmhJE1pUKTmJ99cvaAF6kFIcP2Jv64NGAkmQ/AB8BOGed7d6+0OxNJrJgIue2w/eet7vPdcdj/vw1IJNIRgMxoUgVHFQiJxKMI9/cBTiuHAdBzxrdMylFHmcNoW+TBLu5w3ZUormFCkLSX0lmPtM2NK/4yCPcA/usJL/yeMwommc4aRoWTD/OVRyneB8iUx40ZLlG9Ie8CVbi/y3rQjadPOK0Sy437c+6r7GHhsUuDhVypLGYn9IuWoIFM9KFFHpMsYV4/dCqoAr1IsyESfPdUi9KVhVSQkj9dvq7Y4LbVmyWjHsS0driaTiSWPurgG42xcm1rj2+bebp28WiDAKTA8ft69RnPN5ynzd8grOB7IoXwn4cuB1oRVZi8B1vXCVc3TRarfgw1yueK422hBFq0e4o/96CNdr5R8OQRjVfOMaZQwxDUvNFQjwgji0Y+K1YPLweDgkigcnQQQjmCJ6hLY7ByQDCxIbjiS4UUq+wpcvWJbFfhOFTgh40GAHG4DaBmkvbftTXLA8fmlyStumcYZHGcNKKnzHTY8b4xZJQybXyuc4qB5RO/Q4fQP/nKmQ55YiAI/p3VK3VHfILCOVuHzIbs5FDdeBSFswv2fYPWw4wSE008hQsYcRr4a13whxJL3j6wvaFOeu2fTx6es9cDZsdvjvWh8dt/d/zfQQmEsLhRYtFLyF+o2/8KTqajlEFrFUv4LJmRBcyFAxOOt20VyouFZ7NNE545FB/bjhOtF56Md1f/GQII8hOgdd9dcKmL5N9ScKmK6ZjmU91zMI+JwRUvpcZcSvczsMnqYzaGyJj573pUVouoGK5GqxhnXvCox0rVIYdIIUgAxs0lDNLyjxr/sFyY4JjJZM8QKBMcEBRA10EfiEk6Rjpr0Dw1Q0MVjqrIFhp7aXZ7fBABV8OruVMx3LbgMzrzirEU+Q04Ht1OafLfvhx3f9cXX9H0jUXUq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