Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- #include <stdlib.h>
- void main(char a);
- void core_return(char a);
- void submain(char a);
- float xy[2][13] = {
- { 0,0,0,0,0,0,0,0,0,0,0,0,0 },
- { 100,800,1000,1000,1300,300,500,1500,500,1000,300,150,150 }
- };
- /*
- char * service[13] = {
- "Haircut",
- "Hair Rebond - Short",
- "Hair Rebond - Long",
- "Hair Color - Short",
- "Hair Color - Long",
- "Hair Relax - Short",
- "Hair Relax - Long",
- "Facial",
- "Massage - Half Body",
- "Massage - Full Body",
- "Hot Oill",
- "Manicure",
- "Pedicure"
- };
- */
- int z;
- void main(char a)
- {
- system("cls");
- int i;
- if(z == 0)
- {
- submain(a);
- }
- for(i=0;i<13;i++)
- if(xy[0][i] == 1)
- //printf("%s",service[i]);
- printf("rawr");
- system("pause");
- }
- void submain(char a)
- {
- char menu, // Main Menu
- hr, // Hair Rebond
- hs, // Hairstyle
- hc, // Hair Color
- hx, // Hair Relax
- bm; // Massage
- /**
- * Service Status and Service Price
- * This Declaration is really Delicate!
- * DO NOT EDIT IF DON'T KNOW
- * INFO:
- * 00-12 = Status | Value = Int 0|1
- * 10-12 = Price | Value = Int 0-INT_MAX
- **/
- system("cls");
- printf("SALON\n");
- printf("Option:\n");
- printf("a) Haircut .............................. P%.2f\n",xy[1][0]); // 1
- printf("b) Hair Rebond\n");
- printf(" Short .............................. P%.2f\n",xy[1][1]); // 2
- printf(" Long .............................. P%.2f\n",xy[1][2]); // 3
- printf("c) Hair Color\n");
- printf(" Short .............................. P%.2f\n",xy[1][3]); // 4
- printf(" Long .............................. P%.2f\n",xy[1][4]); // 5
- printf("d) Hair Relax\n");
- printf(" Short .............................. P%.2f\n",xy[1][5]); // 6
- printf(" Long .............................. P%.2f\n",xy[1][6]); // 7
- printf("e) Facial .............................. P%.2f\n",xy[1][7]); // 8
- printf("f) Massage\n");
- printf(" Half Body .............................. P%.2f\n",xy[1][8]); // 9
- printf(" Full Body .............................. P%.2f\n",xy[1][9]); // 10
- printf("g) Hot Oil .............................. P%.2f\n",xy[1][10]); // 11
- printf("h) Manicure .............................. P%.2f\n",xy[1][11]); // 12
- printf("i) Pedicure .............................. P%.2f\n",xy[1][12]); // 13
- printf("I Choose: ");
- scanf("%1s",&menu);
- switch(menu)
- {
- case 'a':
- printf("\nHairstyles\n");
- printf("a) Trim\n");
- printf("b) Short\n");
- printf("c) Bob Cut\n");
- printf("d) Layered\n");
- printf("e) Short with bangs\n");
- printf("Style: ");
- scanf("%1s",&hs);
- // Records that you Purchase Haircut Service #1
- xy[0][0] = 1;
- printf("Thank you for using this Service!\n\n");
- system("pause");
- core_return(a);
- break;
- case 'b':
- printf("\nHair Rebond\n");
- printf("a) Short\n");
- printf("b) Long\n");
- printf("Rebond: ");
- scanf("%1s",&hr);
- if(hr == 'a')
- {
- // Records that you Purchase Hair Rebond - Short Service #2
- xy[0][1] = 1;
- printf("Thank you for using this Service!\n\n");
- system("pause");
- }
- else if(hr == 'b')
- {
- // Records that you Purchase Hair Rebond - Long Service #3
- xy[0][2] = 1;
- printf("Thank you for using this Service!\n\n");
- system("pause");
- }
- core_return(a);
- break;
- case 'c':
- printf("\nHair Color\n");
- printf("a) Short\n");
- printf("b) Long\n");
- printf("Color: ");
- scanf("%1s",&hc);
- if(hc == 'a')
- {
- // Records that you Purchase Hair Color - Short Service #4
- xy[0][3] = 1;
- printf("Thank you for using this Service!\n\n");
- system("pause");
- }
- else if(hc == 'b')
- {
- // Records that you Purchase Hair Color - Long Service #5
- xy[0][4] = 1;
- printf("Thank you for using this Service!\n\n");
- system("pause");
- }
- core_return(a);
- break;
- case 'd':
- printf("\nHair Relax\n");
- printf("a) Short\n");
- printf("b) Long\n");
- printf("Relax: ");
- scanf("%1s",&hx);
- if(hx == 'a')
- {
- // Records that you Purchase Hair Relax - Short Service #6
- xy[0][5] = 1;
- printf("Thank you for using this Service!\n\n");
- system("pause");
- }
- else if(hx == 'b')
- {
- // Records that you Purchase Hair Relax - Long Service #7
- xy[0][6] = 1;
- printf("Thank you for using this Service!\n\n");
- system("pause");
- }
- core_return(a);
- break;
- case 'e':
- // Records that you Purchase Facial Service #8
- xy[0][7] = 1;
- printf("Thank you for using this Service!\n\n");
- system("pause");
- core_return(a);
- break;
- case 'f':
- printf("\nMassage\n");
- printf("a) Half Body\n");
- printf("b) Full Body\n");
- printf("Massage: ");
- scanf("%1s",&bm);
- if(bm == 'a')
- {
- // Records that you Purchase Massage - Half Body Service #9
- xy[0][8] = 1;
- printf("Thank you for using this Service!\n\n");
- system("pause");
- }
- else if(bm == 'b')
- {
- // Records that you Purchase Massage - Full Body Service #10
- xy[0][9] = 1;
- printf("Thank you for using this Service!\n\n");
- system("pause");
- }
- core_return(a);
- break;
- case 'g':
- // Records that you Purchase Hot Oil Service #11
- xy[0][10] = 1;
- printf("Thank you for using this Service!\n\n");
- system("pause");
- core_return(a);
- break;
- case 'h':
- // Records that you Purchase Manicure Service #12
- xy[0][11] = 1;
- printf("Thank you for using this Service!\n\n");
- system("pause");
- core_return(a);
- break;
- case 'i':
- // Records that you Purchase Pedicure Service #13
- xy[0][12] = 1;
- printf("Thank you for using this Service!\n\n");
- system("pause");
- core_return(a);
- break;
- default:
- submain(a);
- }
- }
- void core_return(char a)
- {
- system("cls");
- printf("Do you want another service?");
- scanf("%3s",&a);
- switch(a)
- {
- case 'y':
- case 'yes':
- submain(a);
- break;
- case 'n':
- case 'no':
- z = 1;
- main(a);
- break;
- default:
- system("pause");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement