/*Compile and run the program switch.c. Do you understand it? What will be the effect of swapping the the 3 lines that start with case 1: with the 3 lines that start with case 3:? Check whether your guess is correct. Now swap one of these fragments with the two lines that start with default: and explain the effect caused by this modification.
*/

/* Example: switch statement */

#include <stdio.h>

main()
{
  int d;
  
  printf("Enter a number from 1 to 9: ");
  scanf("%i", &d);
  putchar('\n');
  
  switch (d)
  {
    case 1:
      puts("A stitch in time saves nine.");
      break;
      
    case 2:
    case 6:
    case 9:
      puts("Handsome is as handsome does.");
      break;

    case 3:
      puts("Too many cooks spoil the broth.");
      break;

    case 4:
    case 7:
      puts("Pride comes before a fall.");
      break;

    case 5:
    case 8:
      puts("Many hands make light work.");
      break;

    default:
      puts("Very clever. Try again.");
  }
}
