Advertisement
Guest User

Untitled

a guest
Mar 11th, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 6.00 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <stdlib.h>
  4.  
  5.  
  6. void main(char a);
  7. void core_return(char a);
  8. void submain(char a);
  9.    
  10. float xy[2][13] = {
  11.     { 0,0,0,0,0,0,0,0,0,0,0,0,0 },
  12.     { 100,800,1000,1000,1300,300,500,1500,500,1000,300,150,150 }
  13.     };
  14. /*
  15. char * service[13] = {
  16.     "Haircut",
  17.     "Hair Rebond - Short",
  18.     "Hair Rebond - Long",
  19.     "Hair Color - Short",
  20.     "Hair Color - Long",
  21.     "Hair Relax - Short",
  22.     "Hair Relax - Long",
  23.     "Facial",
  24.     "Massage - Half Body",
  25.     "Massage - Full Body",
  26.     "Hot Oill",
  27.     "Manicure",
  28.     "Pedicure"
  29. };
  30. */
  31. int z;
  32.  
  33. void main(char a)
  34. {
  35.     system("cls");
  36.    
  37.     int i;
  38.     if(z == 0)
  39.     {
  40.         submain(a);
  41.     }
  42.     for(i=0;i<13;i++)
  43.         if(xy[0][i] == 1)  
  44.             //printf("%s",service[i]);
  45.                 printf("rawr");
  46.     system("pause");
  47. }
  48.  
  49. void submain(char a)
  50. {
  51.     char menu, // Main Menu
  52.          hr, // Hair Rebond
  53.          hs,  // Hairstyle
  54.          hc,  // Hair Color
  55.          hx,  // Hair Relax
  56.          bm;  // Massage
  57.    
  58.     /**
  59.      * Service Status and Service Price
  60.      * This Declaration is really Delicate!
  61.      * DO NOT EDIT IF DON'T KNOW
  62.      * INFO:
  63.      * 00-12 = Status | Value = Int 0|1
  64.      * 10-12 = Price  | Value = Int 0-INT_MAX
  65.      **/
  66.  
  67.     system("cls");
  68.     printf("SALON\n");
  69.     printf("Option:\n");
  70.     printf("a) Haircut .............................. P%.2f\n",xy[1][0]); // 1
  71.     printf("b) Hair Rebond\n");
  72.     printf("   Short .............................. P%.2f\n",xy[1][1]); // 2
  73.     printf("   Long .............................. P%.2f\n",xy[1][2]); // 3
  74.     printf("c) Hair Color\n");
  75.     printf("   Short .............................. P%.2f\n",xy[1][3]); // 4
  76.     printf("   Long .............................. P%.2f\n",xy[1][4]); // 5
  77.     printf("d) Hair Relax\n");
  78.     printf("   Short .............................. P%.2f\n",xy[1][5]); // 6
  79.     printf("   Long .............................. P%.2f\n",xy[1][6]); // 7
  80.     printf("e) Facial .............................. P%.2f\n",xy[1][7]); // 8
  81.     printf("f) Massage\n");
  82.     printf("   Half Body .............................. P%.2f\n",xy[1][8]); // 9
  83.     printf("   Full Body .............................. P%.2f\n",xy[1][9]); // 10
  84.     printf("g) Hot Oil .............................. P%.2f\n",xy[1][10]); // 11
  85.     printf("h) Manicure .............................. P%.2f\n",xy[1][11]); // 12
  86.     printf("i) Pedicure .............................. P%.2f\n",xy[1][12]); // 13
  87.    
  88.     printf("I Choose: ");
  89.     scanf("%1s",&menu);
  90.  
  91.     switch(menu)
  92.     {
  93.     case 'a':
  94.             printf("\nHairstyles\n");
  95.             printf("a) Trim\n");
  96.             printf("b) Short\n");
  97.             printf("c) Bob Cut\n");
  98.             printf("d) Layered\n");
  99.             printf("e) Short with bangs\n");
  100.  
  101.             printf("Style: ");
  102.             scanf("%1s",&hs);
  103.  
  104.             // Records that you Purchase Haircut Service #1
  105.             xy[0][0] = 1;
  106.             printf("Thank you for using this Service!\n\n");
  107.             system("pause");
  108.             core_return(a);
  109.             break;
  110.         case 'b':
  111.             printf("\nHair Rebond\n");
  112.             printf("a) Short\n");
  113.             printf("b) Long\n");
  114.  
  115.             printf("Rebond: ");
  116.             scanf("%1s",&hr);
  117.  
  118.             if(hr == 'a')
  119.             {
  120.                 // Records that you Purchase Hair Rebond - Short Service #2
  121.                 xy[0][1] = 1;
  122.                 printf("Thank you for using this Service!\n\n");
  123.                 system("pause");
  124.             }
  125.             else if(hr == 'b')
  126.             {
  127.                 // Records that you Purchase Hair Rebond - Long Service #3
  128.                 xy[0][2] = 1;
  129.                 printf("Thank you for using this Service!\n\n");
  130.                 system("pause");
  131.             }
  132.             core_return(a);
  133.             break;
  134.         case 'c':
  135.             printf("\nHair Color\n");
  136.             printf("a) Short\n");
  137.             printf("b) Long\n");
  138.  
  139.             printf("Color: ");
  140.             scanf("%1s",&hc);
  141.  
  142.             if(hc == 'a')
  143.             {
  144.                 // Records that you Purchase Hair Color - Short Service #4
  145.                 xy[0][3] = 1;
  146.                 printf("Thank you for using this Service!\n\n");
  147.                 system("pause");
  148.             }
  149.             else if(hc == 'b')
  150.             {
  151.                 // Records that you Purchase Hair Color - Long Service #5
  152.                 xy[0][4] = 1;
  153.                 printf("Thank you for using this Service!\n\n");
  154.                 system("pause");
  155.             }
  156.             core_return(a);
  157.             break;
  158.         case 'd':
  159.             printf("\nHair Relax\n");
  160.             printf("a) Short\n");
  161.             printf("b) Long\n");
  162.  
  163.             printf("Relax: ");
  164.             scanf("%1s",&hx);
  165.  
  166.             if(hx == 'a')
  167.             {
  168.                 // Records that you Purchase Hair Relax - Short Service #6
  169.                 xy[0][5] = 1;
  170.                 printf("Thank you for using this Service!\n\n");
  171.                 system("pause");
  172.             }
  173.             else if(hx == 'b')
  174.             {
  175.                 // Records that you Purchase Hair Relax - Long Service #7
  176.                 xy[0][6] = 1;
  177.                 printf("Thank you for using this Service!\n\n");
  178.                 system("pause");
  179.             }
  180.             core_return(a);
  181.             break;
  182.         case 'e':
  183.             // Records that you Purchase Facial Service #8
  184.             xy[0][7] = 1;
  185.             printf("Thank you for using this Service!\n\n");
  186.             system("pause");
  187.             core_return(a);
  188.             break;
  189.         case 'f':
  190.             printf("\nMassage\n");
  191.             printf("a) Half Body\n");
  192.             printf("b) Full Body\n");
  193.  
  194.             printf("Massage: ");
  195.             scanf("%1s",&bm);
  196.  
  197.             if(bm == 'a')
  198.             {
  199.                 // Records that you Purchase Massage - Half Body Service #9
  200.                 xy[0][8] = 1;
  201.                 printf("Thank you for using this Service!\n\n");
  202.                 system("pause");
  203.             }
  204.             else if(bm == 'b')
  205.             {
  206.                 // Records that you Purchase Massage - Full Body Service #10
  207.                 xy[0][9] = 1;
  208.                 printf("Thank you for using this Service!\n\n");
  209.                 system("pause");
  210.             }
  211.             core_return(a);
  212.             break;
  213.         case 'g':
  214.             // Records that you Purchase Hot Oil Service #11
  215.             xy[0][10] = 1;
  216.             printf("Thank you for using this Service!\n\n");
  217.             system("pause");
  218.             core_return(a);
  219.             break;
  220.         case 'h':
  221.             // Records that you Purchase Manicure Service #12
  222.             xy[0][11] = 1;
  223.             printf("Thank you for using this Service!\n\n");
  224.             system("pause");
  225.             core_return(a);
  226.             break;
  227.         case 'i':
  228.             // Records that you Purchase Pedicure Service #13
  229.             xy[0][12] = 1;
  230.             printf("Thank you for using this Service!\n\n");
  231.             system("pause");
  232.             core_return(a);
  233.             break;
  234.         default:
  235.             submain(a);
  236.     }
  237. }
  238.  
  239. void core_return(char a)
  240. {
  241.         system("cls");
  242.         printf("Do you want another service?");
  243.  
  244.         scanf("%3s",&a);
  245.        
  246.         switch(a)
  247.         {
  248.             case 'y':
  249.             case 'yes':
  250.                 submain(a);
  251.                 break;
  252.             case 'n':
  253.             case 'no':
  254.                 z = 1;
  255.                 main(a);
  256.                 break;
  257.             default:
  258.                 system("pause");
  259.         }
  260. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement