Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C++ Compiler.
- Code, Compile, Run and Debug C++ program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <iostream>
- using namespace std;
- int main()
- {
- char ch;
- int quantity;
- int toy, A = 500, B = 750, C = 200, D = 100, E = 150, F = 250, G = 2000, H = 780, I = 3000, J = 300, K = 4000, L = 500, M = 690, N = 600, O = 100;
- int total;
- printf("\t\t\t Welcome to Benits Toy Store\n");
- printf("\n\tAvailable Toys:\n\n");
- printf("\tToy Letter\t\tToy Name\t\tPrice\n");
- printf("\tA \t\t Racecar \t\t\t 500php\n");
- printf("\tB \t\t Toy Gun \t\t\t 750php\n");
- printf("\tC \t\t Action Figure \t\t\t 200php\n");
- printf("\tD \t\t Annabelle Doll \t\t 100php\n");
- printf("\tE \t\t Uno Cards \t\t\t 150php\n");
- printf("\tF \t\t Basketball \t\t\t 250php\n");
- printf("\tG \t\t Skate Board \t\t\t 2000php\n");
- printf("\tH \t\t Inflatable Pool\t\t 780php\n");
- printf("\tI \t\t Bicycle \t\t\t 3000php\n");
- printf("\tJ \t\t Teddy Bear \t\t\t 300php\n");
- printf("\tK \t\t Gaming Console \t\t 4000php\n");
- printf("\tL \t\t Beyblade \t\t\t 500php\n");
- printf("\tM \t\t Toy Microscope \t\t 690php\n");
- printf("\tN \t\t Vtech \t\t\t\t 600php\n");
- printf("\tO \t\t Play Dough \t\t\t 100php\n");
- printf("\tQ \t\t End Transaction? \t\t\t q\n");
- do
- {
- printf("Please Select The Letter of The Toy: \t ");
- scanf("%d", &toy);
- ch = getchar();
- }
- while(ch!='A' && ch!='B' && ch!='C' && ch!='D');
- printf("\n");
- switch(ch)
- {
- case 'A':printf("\tA \t\t Racecar \t\t\t 500php\n");
- break;
- case 'B':printf("\tB \t\t Toy Gun \t\t\t 750php\n");
- break;
- case 'C':printf("\tC \t\t Action Figure \t\t\t 200php\n");
- break;
- case 'D':printf("\tD \t\t Annabelle Doll \t\t 100php\n");
- break;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement