fork download
  1. //********************************************************
  2. //
  3. // Assignment 6 - Structures
  4. //
  5. // Name: Heather Grothe
  6. //
  7. // Class: C Programming, Spring 2026
  8. //
  9. // Date: March 7, 2026
  10. //
  11. // Description: Program which determines overtime and
  12. // gross pay for a set of employees with outputs sent
  13. // to standard output (the screen).
  14. //
  15. // Call by Value design
  16. //
  17. //********************************************************
  18.  
  19. // Define and Includes
  20. #include <stdio.h>
  21.  
  22. //********************************************************
  23. //
  24. // Assignment 6 - Structures
  25. //
  26. // Name: Heather Grothe
  27. //
  28. // Class: C Programming, Spring 2026
  29. //
  30. // Date: March 7, 2026
  31. //
  32. // Description: Program which determines overtime and
  33. // gross pay for a set of employees with outputs sent
  34. // to standard output (the screen).
  35. //
  36. // Call by Value design
  37. //
  38. //********************************************************
  39.  
  40. // Define and Includes
  41. #include <stdio.h>
  42.  
  43. int irishLicensePlateValidator(int year, int halfYear, char county, int ssssss);
  44.  
  45. int main () {
  46. int output;
  47.  
  48.  
  49.  
  50.  
  51. output = irishLicensePlateValidator (2015, 2, 'C', 111111);
  52.  
  53. printf("The output is: %2d", output);
  54.  
  55. return 0;
  56.  
  57. }
  58.  
  59.  
  60. // add function header comments
  61. int irishLicensePlateValidator(int year, int halfYear, char county, int ssssss)
  62. {
  63.  
  64. if(year < 2013 || year > 2024){
  65. return 0;
  66. }
  67.  
  68. if(halfYear != 1 && halfYear != 2){
  69. return 0;
  70. }
  71.  
  72. switch(county){
  73.  
  74. case 'C':
  75. break;
  76. case 'D':
  77. break;
  78. case 'G':
  79. break;
  80. case 'L':
  81. break;
  82. case 'T':
  83. break;
  84. case 'W':
  85. break;
  86.  
  87. case 'c':
  88. break;
  89. case 'd':
  90. break;
  91. case 'g':
  92. break;
  93. case 'l':
  94. break;
  95. case 't':
  96. break;
  97. case 'w':
  98. break;
  99. default:
  100. return 0;
  101. }
  102.  
  103. if (ssssss > 999999){
  104. return 0;
  105.  
  106. }
  107.  
  108. return 1;
  109. }
Success #stdin #stdout 0s 5324KB
stdin
Standard input is empty
stdout
The output is:  1