Advertisement
M4ritimeSeeker

PASS Week 9/29 Skeleton Code

Sep 28th, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.08 KB | None | 0 0
  1. // SKELETON CODE FOR PRACTICE PROBLEMS
  2.  
  3.  
  4. /*** PROBLEM 1B ***/
  5.  
  6.  
  7. #include <stdio.h>
  8. #include <math.h>
  9.  
  10. double ComputeAreaOfSquare(double);
  11.  
  12. int main(void)
  13. {
  14.     //Local Declarations
  15.     double base = 0.0;
  16.     double area = 0.0;
  17.  
  18.     //Local Statements
  19.  
  20.     /* PROGRAM HERE */
  21.  
  22.     return 0;
  23.  
  24. }//end main
  25.  
  26. //WRITE ComputeAreaOfSquare FUNCTION HERE
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44. /*** PROBLEM 1C ***/
  45.  
  46.  
  47. #include <stdio.h>
  48. #include <math.h>
  49.  
  50. void PrintInstructions(void);
  51. double GetInput(void);
  52. double ComputeAreaOfSquare(double);
  53. void PrintOutput(double);
  54.  
  55. int main(void)
  56. {
  57.     //Local Declarations
  58.     double base = 0.0;
  59.     double area = 0.0;
  60.  
  61.     //Local Statements
  62.    
  63.     /* PROGRAM HERE */
  64.    
  65. return 0;
  66. }//end main
  67.  
  68.  
  69. //You would write function descriptions here
  70. void PrintInstructions()
  71. {
  72.     /* Function Body goes here */
  73.  
  74. }//end function
  75.  
  76.  
  77. //You would write function descriptions here
  78. double GetInput()
  79. {
  80.     /* Function Body goes here */
  81. }//end function
  82.  
  83.  
  84. //You would write function descriptions here
  85. double ComputeAreaOfSquare(double baseIn)
  86. {
  87.     /* Function Body goes here */
  88. }//end function
  89.  
  90.  
  91. //You would write function descriptions here
  92. void PrintOutput(double areaIn)
  93. {
  94.     /* Function Body goes here */
  95. }//end function
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121. /*** PROBLEM 2 ***/
  122.  
  123.  
  124. #include <stdio.h>
  125. #include <math.h>
  126.  
  127. double CalcHypotenuse(double, double);
  128. double CalcArea(double, double);
  129. double CalcPerimeter(double, double, double);
  130.  
  131. int main(void)
  132. {
  133.     //Local Decalarations
  134.     double sideA = 0.0;
  135.     double sideB = 0.0;
  136.     double area = 0.0;
  137.     double perimeter = 0.0;
  138.  
  139.     //Local Statements
  140.  
  141.     /* PROGRAM HERE*/
  142.     //Remember to Prompt user for input for sideA and sideB ONLY
  143.  
  144.     return 0;
  145.  
  146. }//end main
  147.  
  148. //WRITE CalcHypotenuse FUNCTION HERE
  149.  
  150.  
  151. //WRITE CalcArea FUNCTION HERE
  152.  
  153.  
  154. //WRITE CalcPerimeter FUNCTION HERE
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182. /*** PROBLEM 3 AND 4 (This skeleton works for both) ***/
  183.  
  184. #include <stdio.h>
  185. #include <stdlib.h>
  186. #include <time.h>
  187.  
  188. int main(void)
  189. {
  190.     /* PROGRAM HERE */
  191.  
  192.     return 0;
  193.  
  194. }//end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement