/* Shipping.c */
#include <stdio.h>

main()
{
 int shipping_method;
 double shipping_cost;

 printf("How do you want the order shipped?\n");
 printf("1 - Ground\n");
 printf("2 - 2-day air\n");
 printf("3 - Overnight air\n");
 printf("Enter the number of the shipping method you want: ");
 scanf("%d", &shipping_method);

 switch(shipping_method)
  {
    case 1:
      shipping_cost = 5.00;
      break;
    case 2:
      shipping_cost = 7.50;
      break;
    case 3:
      shipping_cost = 10.00;
      break;
    default:
      shipping_cost = 0.00;
      break;
  }

 if (shipping_cost == 0)
   {
     printf("Illegal selection--no result calculated\n");
   }
 else
   {
     printf("Add $.2f to the order total to cover shipping cost.\n", shipping_cost);
   }

 return 0;
}

