Advertisement
Guest User

h2

a guest
Mar 18th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1.  
  2. /******************************************************************************
  3.  
  4. Online C++ Compiler.
  5. Code, Compile, Run and Debug C++ program online.
  6. Write your code in this editor and press "Run" button to compile and execute it.
  7.  
  8. *******************************************************************************/
  9.  
  10. #include <iostream>
  11.  
  12. using namespace std;
  13.  
  14. int main()
  15. {
  16. char ch;
  17. int quantity;
  18. 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;
  19. int total;
  20.  
  21.  
  22. printf("\t\t\t Welcome to Benits Toy Store\n");
  23. printf("\n\tAvailable Toys:\n\n");
  24. printf("\tToy Letter\t\tToy Name\t\tPrice\n");
  25. printf("\tA \t\t Racecar \t\t\t 500php\n");
  26. printf("\tB \t\t Toy Gun \t\t\t 750php\n");
  27. printf("\tC \t\t Action Figure \t\t\t 200php\n");
  28. printf("\tD \t\t Annabelle Doll \t\t 100php\n");
  29. printf("\tE \t\t Uno Cards \t\t\t 150php\n");
  30. printf("\tF \t\t Basketball \t\t\t 250php\n");
  31. printf("\tG \t\t Skate Board \t\t\t 2000php\n");
  32. printf("\tH \t\t Inflatable Pool\t\t 780php\n");
  33. printf("\tI \t\t Bicycle \t\t\t 3000php\n");
  34. printf("\tJ \t\t Teddy Bear \t\t\t 300php\n");
  35. printf("\tK \t\t Gaming Console \t\t 4000php\n");
  36. printf("\tL \t\t Beyblade \t\t\t 500php\n");
  37. printf("\tM \t\t Toy Microscope \t\t 690php\n");
  38. printf("\tN \t\t Vtech \t\t\t\t 600php\n");
  39. printf("\tO \t\t Play Dough \t\t\t 100php\n");
  40. printf("\tQ \t\t End Transaction? \t\t\t q\n");
  41.  
  42. do
  43. {
  44. printf("Please Select The Letter of The Toy: \t ");
  45. scanf("%d", &toy);
  46. ch = getchar();
  47. }
  48. while(ch!='A' && ch!='B' && ch!='C' && ch!='D');
  49.  
  50. printf("\n");
  51.  
  52. switch(ch)
  53. {
  54. case 'A':printf("\tA \t\t Racecar \t\t\t 500php\n");
  55. break;
  56.  
  57. case 'B':printf("\tB \t\t Toy Gun \t\t\t 750php\n");
  58. break;
  59.  
  60. case 'C':printf("\tC \t\t Action Figure \t\t\t 200php\n");
  61. break;
  62.  
  63. case 'D':printf("\tD \t\t Annabelle Doll \t\t 100php\n");
  64. break;
  65.  
  66. }
  67.  
  68. return 0;
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement