9.04.2011

Algorithms and Flowchart

Algorithms
  1. A sequential solution of any program that written in human language,called algorithm.
  2. Algorithm is first step of the solution process, after the analysis of problem, programmer write the algorithm of that problem.
  3. Example of Algorithms:
Q. Write a algorithem to find out number is odd or even?
Ans. 
step 1 : start
step 2 : input number
step 3 : rem=number mod 2
step 4 : if rem=0 then
               print "number even"
           else
               print "number odd"
           endif
step 5 : stop


Flowchart

1. Graphical representation of any program is called flowchart.
2. There are some standard graphics that are used in flowchart as following:

Start / Stop terminal box flowchart symbol
Figure: Start/Stop terminal box

Input/output flowchart symbol
Figure: Input/Output box

Process / Instructions box flowchart symbol
Figure: Process/Instruction box

Lines or Arrows to show the flow of flowchart
Figure: Lines or Arrows

Decision box flowchart symbol
Figure: Decision box

Connector box flowchart symbol
Figure: Connector box

Comment/Expression flowchart symbol
Figure: Comment box

Preparation flowchart symbol
Figure: Preparation box

Separate flowchart symbol
Figure: Separate box

Q. Make a flowchart to input temperature, if temperature is less than 32 then print "below freezing" otherwise print  "above freezing"?
Ans.
Flowchart Example of C progarm
Figure: Flowchart example of C program


Related programs:

  1. Flowchart for search prime number
  2. Factorial C program, Algorithm and Flowchart
  3. Flowchart for finding Armstrong number
  4. Rules for constructing an Algorithm
  5. if, if...else, nested if...else, if...else if - statement and flowchart
  6. Algorithm for rectangle number pattern
  7. Algorithm for star pyramid
  8. Draw a flowchart, and write algorithm and C program for calculate sum of  square

107 comments:

  1. Draw a flowchart diagram to find the square of a number

    ReplyDelete
    Replies
    1. Your required flowchart for square of a number at:

      http://cprogrammingcodes.blogspot.in/2012/10/square-number-program-and-flowchart.html

      Delete
  2. flowchart for finding out the armstrong number.....please

    ReplyDelete
    Replies
    1. @Darshan Chavre,
      Your required flowchart for finding Armstrong number at:

      http://www.cprogrammingcodes.blogspot.in/2012/10/flowchart-for-finding-armstrong-number.html

      Delete
  3. Write a C program to accept a number from user and print the sum of square. Also draw the flowchart of program.... please..

    ReplyDelete
    Replies
    1. and also the algorithm...

      Delete
    2. @Meray Ney
      Your required sum of square C program, algorithm and flowchart at:

      http://cprogrammingcodes.blogspot.in/2012/10/sum-of-square-program-algorithm-and.html

      Delete
  4. Algorithm step for pyramid of numbers

    ReplyDelete
  5. Algorithm steps and flowchart for the stars given.
    *
    * *
    * * *
    * * * *
    * * * * *

    ReplyDelete
    Replies
    1. Algorithm and program for above star pyramid at:

      http://cprogrammingcodes.blogspot.in/2012/10/algorithm-for-star-pyramid.html

      Delete
  6. I want to write an algorithm for a c program of structures and its flowchart. How can de they done?

    ReplyDelete
  7. ques===> draw a flowchart which would display the summation of the following series up to nth terms, n being accepted by the user.
    2+5+6+7+10+9+........nth term

    ReplyDelete
  8. flowchart for sum of 3 digits of 3 digit number

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. write a c program that takes electricity unit as input and print the total amount of bill..bill criteria 1-100 and price is 5.801,bill 101-200 and price 8.923,bill 201 and price 11.293,bill 201-300 and price 11.293,bill above 300 and price 74.561....please

    ReplyDelete
  11. eg of flowchart for array, string and recursive functions...

    ReplyDelete
    Replies
    1. Read the book Lte Us C of yashwant kanetkhar.
      You will get your answer.
      Ok........

      Delete
  12. write an algorithm for the sum of individual digits of a positive integer and draw aflowchart

    ReplyDelete
  13. me too, i need an example of .. a flowchart that has a string variable ..

    thanks :)

    ReplyDelete
  14. show the flowchart and algorithm of finding the upper triangle of metrics

    ReplyDelete
  15. can u tell me about how to find the biggest number among the 2 numbers in a flowchart and algorithm

    ReplyDelete
  16. write algorithm and flowchart to generate all prime no.s between 1 and n where n is supplied by users

    ReplyDelete
  17. please visit this site and get more information about TECHNOLOGY
    www.lbefit.blogspot.com

    ReplyDelete
  18. algorithm, programme n flow chart for finding out no. of vowels in a string.

    ReplyDelete
  19. algorithm programme n flow chart for finding out no. of vowels in a string.

    ReplyDelete
  20. flowchart to print student grade using structure

    ReplyDelete
  21. flowchart to print the student grade using structure...........pls

    ReplyDelete
  22. HOW CAN I WRITE FACTORIAL OF A NUMBER IN THIS FORM
    5!=5X4X3X2X1=120 ?

    ReplyDelete
    Replies
    1. fact=1;
      for(i=1;i<=n;i++)
      {
      result=fact*i;
      }
      printf("%d",sum); //Hope you got

      Delete
    2. fact=1;
      for(i=n;i>=1;i--)
      {
      fact=fact*i;
      }
      printf("%d",fact);

      Delete
    3. void main()
      {
      int n,fact=1,i;
      scanf("%d",&n);
      for(i=n;i>=1;i--)
      {
      fact=fact*i;
      }
      printf("Fact :%d",fact);
      getch();
      }

      Delete
  23. Where can I find flowchart for the program that involves swapping two no.s and displaying them on screen???
    ASAP Please!!!

    ReplyDelete
  24. Where can I find flowchart for the program that involves swapping two no.s and then displaying them on screen???

    ASAP Please!!!

    ReplyDelete
  25. draw the flow chart of the program that input 4 digit number and show its output as reverse for example 1234 shows 4321

    ReplyDelete
  26. Hello sir,
    Can you help me in making a flow chart and algorithm of a program to find "Hartmann's Constant" using arc spectrum of brass and copper.Please.... this is for my project , for Bsc physics.

    ReplyDelete
  27. Hello , where can i get the algorithms for :-
    Sparse matrix
    Insert and delete an element in an array , Stack , queue , Linked list
    Bubble sort
    Selection sort
    Binary tree

    ReplyDelete
  28. can anyone help me to write an algorithm for permutations of a given set of series

    ReplyDelete
  29. flowcharts:
    inputs: month(in numbers) and day (birthday)
    output will the zodiac sign!!

    help please. thanks

    ReplyDelete
  30. CFan anyone make a algorithm to determine samllest number among the five...??

    ReplyDelete
  31. pls help me to find the algorithm of lcm and hcf


    ReplyDelete
  32. plz make a algorithm to find first five even numbers

    ReplyDelete
  33. flowchart for palindrome checking

    ReplyDelete
  34. plz tell me sir k 3 digits main sy greater digits find krny k liy flowchart kesy bnny ga.plz flowchart bna k send kr dain plz

    ReplyDelete
  35. .Write a c++ program to create a class reverse that will reverse a 4 digit number.and also write the concept,algorithm and flowchart.. ?plzz give me

    ReplyDelete
  36. can u plz tell me th logic and the flowchart to find the value that occurs atleast once in two matrices and printf its position in both matrices

    ReplyDelete
  37. can u plz tell me the flow chart and the logic to find the value that occurs atleast once in two matrices and print its position in both matrices.

    ReplyDelete
  38. pls..help me finding a sample problem of flowchart that has already the solution of flowchart either sequential,repetition and conditional

    ReplyDelete
  39. why are we first use flowchart?

    ReplyDelete
    Replies
    1. It helps to write code and to know the flow of codes too

      Delete
  40. Print Algoritm to find numbers(between 1 to 100) those r divisible bu 2 & not divisible by 3 &5.......

    ReplyDelete
  41. please help me with this...write Algorithm to find the average of a set of five numbers

    ReplyDelete
  42. flowchart for simple structure in c,employee details using structure in c, student details using union in c

    ReplyDelete
  43. flowchart for simple structure in c,employee details using structure in c, student details using union in c

    ReplyDelete
  44. algorithm for counting binary n.o and checkinging odd r even by n.o of 1s and 0s

    ReplyDelete
  45. This comment has been removed by the author.

    ReplyDelete
  46. can help for this program? it finds the sum of a series for a given value of X
    sum= 1- X^2/2! + X^4/4! - X^6/6! + X^8/8! - X^10/10!

    ReplyDelete
  47. sir...i want a program to print
    *******
    **********
    ************
    **************

    ReplyDelete
  48. #include
    #include
    #include
    void main()
    {
    int n=8,i,t=4,j;
    clrscr();
    for(i=0;i<t;i++)
    {
    for(j=0;j<n;j++)
    {
    printf("*");
    }
    printf("\n");
    n=n+2;
    }
    getch();
    }

    ReplyDelete
  49. flowchart for a scientific calculator

    ReplyDelete
  50. flowchart and algorithm to reverse a number and check if it is a palindrome

    ReplyDelete
  51. where to write the following steps can you please help me sir

    ReplyDelete
  52. algorithm for checking whether number is a armstrong number or not

    ReplyDelete
  53. please I want Answers for this question:

    write an algorithm and draw a flowchart to:
    1- find largest between two numers.
    2- determine if a number is positive or nevative.
    3- determine if a number is odd or even.

    ReplyDelete
  54. I need Flowcharts and algorithms for all these
    1. Write a program to find simple & compound Interest.
    2. Write a program to find the sum & average of three numbers.
    3. Write a program to voter is eligible or not.
    4. Write a program to find largest of three numbers.
    5. Write a program to whether a given number is prime or not.
    6. Write a program to find the roots of the quadratic equation using switch
    statement.
    7. Write a program to perform arithmetic operations of the two numbers using
    switch statement.
    8. Write a program to find the sum of the individual digit until a single digit.
    9. Write a program to find frequency of presence of a digit in a given number.
    10. Write a program to find count the number of vowels and consonants in a given
    string.
    11.Write a program to find the series 1+x+x2+x3+……+xn .
    12.Write a program to find the series 1+1/3!+1/5!+……+1/n!.
    13. Write a program to generate & print the Fibonacci series.
    14. Write a program to find the exponent series.
    15.Write a program to find the sine series.
    16. Write a program to find the cosine series
    17. Write a program to find a string whether it is palindrome or
    not
    18. Write a program to find a character is alphabetic or numeric or
    special character.
    19. Write a program to sort the number in ascending order
    20. Write a program to find second largest & second smallest of
    given number.
    21. Write a program to find the sum & subtract of two given matrix.
    22. Write a program to find the multiplication of two matrix.
    23. Write a program to find the trace of a matrix.
    24. Write a program to find the norm of a matrix.
    25. Write a program to find sum of each row & sum of each
    column of the given matrix.

    ReplyDelete
  55. please i want the answer.
    an old music cost Rs.20 and new music video cost Rs. 50. write the algorithm to purchase 5 numbers of old music video and 7 numbers of new music video through online purchase

    ReplyDelete
  56. i need algorithm and flowchart
    Write a program to find a string whether it is palindrome or
    not

    ReplyDelete
  57. Draw the flowchart and write c program to display Fibonacci series numbers

    ReplyDelete
  58. algorithm for call by value

    ReplyDelete
  59. algorithm to display the numbers in the form as below by accepting a number 'n' from the user(here 'n' is ending digit up till which the series is to be printed
    eg:if 'n'=8

    1
    12
    123
    1234
    12345
    123456
    1234567
    12345678

    ReplyDelete
  60. flowchart for maximum number using function

    ReplyDelete
  61. flowchart for decimalnumber to binary

    ReplyDelete
  62. flow chart for find maximum element in an array using pointer

    ReplyDelete
  63. Can anyone please help me to draw Flowchart and Develop Algorithm of:-
    1) Find max. from 2 number
    2) Find max. from 3 number
    3) Min. value from 10 number
    4) Fibonaci series


    any one please?

    ReplyDelete
  64. #include

    int main()
    {
    int n, reverse = 0;

    printf("Enter a number to reverse\n");
    scanf("%d", &n);

    while (n != 0)
    {
    reverse = reverse * 10;
    reverse = reverse + n%10;
    n = n/10;
    }

    printf("Reverse of entered number is = %d\n", reverse);

    return 0;
    }


    Algorithm and flow chart for this programme

    ReplyDelete
  65. Plz give me algorithms and flowchart of following:
    1.find area and perimwter of rectangle
    2.find even and odd numbers from given two numbers
    3.program to accept three values for a, b , c from user and to show largest no. Among them- nested if statment
    4.program to except mrks of maths, physics, chemistry ,computer science and english calculate total and percentage of students getting grade - else if ladder

    ReplyDelete
  66. Algorithm and flowchart for the conversion of decimal to octal number using functions

    ReplyDelete
  67. Flow chat andAlogorithm for phone book???

    ReplyDelete
  68. Create a flow chart that finds the largest square number less than 40.

    ReplyDelete
  69. write a c program to get marks memo according to users input of marks according to JNTU ananthapur

    ReplyDelete
  70. Draw a flowchart to print frequency of a digit in a number.
    Read a number and digit for frequency from user.

    ReplyDelete
  71. Can u find a flowchart and algorithm for pascals triangle

    ReplyDelete
  72. can anyone help me with this problem :present the algorithm and flowchart of this - arrange sequentially and in ascending order of scattered numbers

    ReplyDelete
  73. write an algorithm and program to find out the square of n prime numbers

    ReplyDelete
  74. write an algorithm that read any 20 integer value and print the total and also draw its flowchart?

    ReplyDelete
  75. A program for calculating sum of prime numbers and as well as sum of natural numbers?

    ReplyDelete
  76. Write the algorithms and draw the flow charts for the following problems on
    assignment sheets:
    1. To find the compound interest.
    2. To find the factorial of a given number.
    3. To print odd numbers between 51 and 100.
    4. To check whether a number entered by the user in Prime or not.
    5. To check whether a number entered by the user in Palindrome or not.
    6. To check whether a number entered by the user in Armstrong or not.
    7. To generate sum of the following series up to nth term entered by the user :
    1 + 2 + 3 + 4…………n
    8. To generate sum of the following series up to nth term entered by the user :
    1 + (1+2) + (1+2+3) + (1+2+3+4) + …….(1+2+3+….n)
    9. To print the square series up to nth term entered by the user :
    1 4 9 16 25 ………
    10. To print the square series up to nth term entered by the user :
    1! + 2! + 3! + 4! + ………n!

    ReplyDelete
  77. Write algorithm to this problem: Ramshewak goes to market for buying some fruits and vegetables. He is having a currency of Rs 500 with him for marketing. From a shop he purchases 2.0 kg Apple priced Rs. 50.0 per kg, 1.5 kg Mango priced Rs.35.0 per kg, 2.5 kg Potato priced Rs.10.0 per kg, and 1.0 kg Tomato priced Rs.15 per kg. He gives the currency of Rs. 500 to the shopkeeper. Find out the amount shopkeeper will return to Ramshewak


    plzz give the ans

    ReplyDelete
  78. I'm the fresher I want to know the basics of algorithm and flowchart .....

    Kindly reply fast

    ReplyDelete
  79. I'm the fresher I want to know the basics of algorithm and flowchart .....

    Kindly reply fast

    ReplyDelete
  80. Write a c program to sort n elements using visual bubble sort. Please reply faster.

    ReplyDelete
  81. Write a c program to sort n elements using visual/graphics bubble sort.

    ReplyDelete
  82. Write a c program to sort n elements using visual/graphics bubble sort.

    ReplyDelete
  83. Write a c program to sort n elements using visual/graphics bubble sort.

    ReplyDelete
  84. write an algorithm to find the given digits are binary numbers or not.?

    ReplyDelete
  85. write an alogarithm for the following programme
    #include
    void main()
    {
    int a=4,b=7,x;
    x=(a+5)>b?a:b-3;
    printf("%d%d%d",a,b,x)
    }

    ReplyDelete
  86. Algorithm to draw multiple boxes using function in c programming

    ReplyDelete
  87. Algorithm and flow chart to c-program implement sine wave using graphics ?

    ReplyDelete
  88. flowchart of sum of two matrices

    ReplyDelete