10.13.2012

Flowchart for switch-case

How to write switch case flowchart?

switch case statement:

switch( choice )
{
  case 1:
      statement 1;
      break;

  case 2:
      statement 2;
      break;

  case 3:
      statement 3;
      break;

  case n:
      statement n;
}

(in above module n = number of cases.)


switch case flowchart:



switch case statement flowchart in C
Figure: flowchart of switch case statement in C

Related programs:

  1. Flowchart for if, if..else, nested if..else, if..else if
  2. Flowchart for prime number
  3. Flowchart for finding Armstrong number
  4. Sum of square - C program, Algorithm and Flowchart
  5. Factorial - C program, Algorithm and Flowchart

5 comments:

  1. algorithm for switch case is always based on else if else ladder.

    ReplyDelete
  2. by using the concept of flowchart we can understand any program very easily

    ReplyDelete
  3. you only write syntax and insert image but not explained.
    If you explained with an example that is best....

    ReplyDelete