Advertisement
ElvisYiHong

123

Dec 7th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdbool.h>
  3.  
  4. int main() {
  5. double admin_fee, course_fee, meal_v_fee, meal_nv_feel;
  6. char category;
  7. int course_no;
  8. bool quit = true;
  9. printf("\nA. Soft Skills\nB. Computing Skills\n");
  10. printf("Which category you want to learn for?: ");
  11.  
  12. while (quit) {
  13. scanf("%s", &category);
  14. switch (category) {
  15. case'A':
  16. case'a':
  17.  
  18. printf("Category: Software Skills");
  19. printf("\n____________________________________________________________________________________________________________");
  20. printf("\n| NO | Course | Day | Admin | Payment Rate (RM) |");
  21. printf("\n| | | | Fee | Per Day |");
  22. printf("\n| | | | (RM) |------------------------------------------|");
  23. printf("\n| | | | | Fee | Meal | Meal |");
  24. printf("\n| | | | | | (vegetarian) | (non-vegetarian) |");
  25. printf("\n|----|--------------------------|-------------|-----------------|------------------------------------------|");
  26. printf("\n| 1 | Team Building | 3 | 50 | 800 | 75 | 50 |");
  27. printf("\n|----|--------------------------|-------------|-----------------|-------|--------------|-------------------|");
  28. printf("\n| 2 | Communications | 3 | 50 | 650 | 50 | 25 |");
  29. printf("\n|----|--------------------------|-------------|-----------------|-------|--------------|-------------------|");
  30. printf("\n| 3 | Corporate Career | 3 | 50 | 750 | 50 | 25 |");
  31. printf("\n| | Growth | | | | | |");
  32. printf("\n|----|--------------------------|-------------|-----------------|-------|--------------|-------------------|");
  33. printf("\n| 4 | Conflict Management | 3 | 50 | 600 | 50 | 25 |");
  34. printf("\n|____|__________________________|_____________|_________________|_______|______________|___________________|");
  35. printf("\nWhat course you want to book? Input Q to return");
  36. break;
  37. case'B':
  38. case'b':
  39. printf("Category: Computing Skills");
  40. printf("\n____________________________________________________________________________________________________________");
  41. printf("\n| NO | Course | Day | Admin | Payment Rate (RM) |");
  42. printf("\n| | | | Fee | Per Day |");
  43. printf("\n| | | | (RM) |------------------------------------------|");
  44. printf("\n| | | | | Fee | Meal | Meal |");
  45. printf("\n| | | | | | (vegetarian) | (non-vegetarian) |");
  46. printf("\n|----|--------------------------|-------------|-----------------|------------------------------------------|");
  47. printf("\n| 1 | Software Design | 5 | 50 | 1000 | 50 | 25 |");
  48. printf("\n|----|--------------------------|-------------|-----------------|-------|--------------|-------------------|");
  49. printf("\n| 2 | Web Development | 5 | 50 | 1100 | 75 | 50 |");
  50. printf("\n|----|--------------------------|-------------|-----------------|-------|--------------|-------------------|");
  51. printf("\n| 3 | Cloud Computing | 3 | 50 | 1300 | 50 | 25 |");
  52. printf("\n|----|--------------------------|-------------|-----------------|-------|--------------|-------------------|");
  53. printf("\n| 4 | Mobile Content | | | | | |");
  54. printf("\n| | Design and | 5 | 50 | 1200 | 75 | 50 |");
  55. printf("\n| | Developmen | | | | | |");
  56. printf("\n|____|__________________________|_____________|_________________|_______|______________|___________________|");
  57. printf("\nWhat do you want to book? ");
  58. scanf("%d", &course_no);
  59. break;
  60. default:
  61. printf("Invalid Input! PLease input again: ");
  62. }
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement