Menu

(Solved) : Exercise 1 Following Problems 1 Write Function Meets Given Specification Choose Appropriat Q37933947 . . .

Exercise 1 For each of the following problems: 1. Write a function that meets the given specification. Choose appropriate datProblem #2 Write a function that accepts a one dimensional integer array and its size as input parameters. The function shoulProblem #1 Sample Run: Problem #2 Sample Run: Enter (x,x) coordinates of A: 1 θ Enter (x,x) coordinates of B: 8 4 Enter (&x)

Exercise 1 For each of the following problems: 1. Write a function that meets the given specification. Choose appropriate data types for the input parameters and return values. The function itself should be “silent” (i.e., not prompt for input or print any output) Write a complete program to test your function. The program should ask the user for input values and pass them to the function. It should print the value returned by the function. 2. Problem #1 Write a function that accepts the x and y coordinates of three points (A, B, C) in a 2-D plane (six inputs total). The coordinates can have decimal places in them. If point C is closer in distance to point A, then the function should return the character ‘A’. However, if C is closer to B, then the function should return ‘B’ instead. If C is equally distant to A and B, return the character’-‘ Copy and paste your complete program here: Problem #2 Write a function that accepts a one dimensional integer array and its size as input parameters. The function should return the smallest value that is stored in the array Copy and paste your complete program here: Problem #1 Sample Run: Problem #2 Sample Run: Enter (x,x) coordinates of A: 1 θ Enter (x,x) coordinates of B: 8 4 Enter (&x) coordinates of C: 5-1.5 result: A Enter five values: 1 8 -5 8 19 smallest5 Enter five values: 987609 smallest 0 Enter (Č.Χ) coordinates of A: θ θ Enter (X,X) coordinates of B: 10 θ Enter (č.Χ) coordinates of C: 5 3 result: Show transcribed image text

Expert Answer


Answer to Exercise 1 Following Problems 1 Write Function Meets Given Specification Choose Appropriat Q37933947 . . .

OR