Tuesday, 11 September 2012

The policy followed by a company to process customer orders is given by the following rules: (a) If a customer order is less than or equal to that in stock and has credit is OK, supply as requirement. (b) If has credit is not OK do not supply. Send him intimation. (c) If has credit is Ok but the item in stock is less than has order, supply what is in stock. Intimate to him data the balance will be shipped. Write a C program to implement the company policy.

 int p;
 char cr;
 printf("Enter the customer order :- ");
 printf("Is his credit OK ?(y/n)\n");
 if(p<=100 && cr=='y' )
  printf("\nMaaldar party hai Boss :) !!! %d product is supplied to this customer.");
 else if(p>100 && cr=='y')
  printf("\nMaaldar party hai Boss :) !!! But sorry we have not such amount of product so 100 products will be supplied now.");
  printf("\nSorry boss! First clear your credits, until we cant supply you any more.");


1 comment: