Question: Hi, can I get some help on my programming assignment? Can you guys write this out for me? Please see below for what the program
Hi, can I get some help on my programming assignment? Can you guys write this out for me? Please see below for what the program needs to do. Needs to be in C. Thank you for taking the time to do this, really appreciate it :) Your job will be to create a program that uses pointers. Your output must be done in the main function and the calculations MUST be done in the three functions. Therefore you MUST use pointers correctly.
You must declare and implement the following 3 functions. Below are the three prototypes that you must use in this program.
void max(int *a, int *b, int *c, int *d, int *result);
void min(int *a, int *b, int *c, int *d, int *result);
void mul(int *a, int *b, int *c, int *d, int *result);
The functions have the following meaning:
max
finds the max value of a,b,c,d and stores the largest value in result.
min
finds the min value of a,b,c,d and stores the largest value in result.
mul
multiplies a * b * c and divides by d. Stores that value in result.
Below is an example input/output. This input will be read in via the keyboard (use
scanf).
| input | output (note that user input is shown in bold) |
| 1 2 3 4 | Enter the 4 numbers: 1 2 3 4 The max is 4. The min is 1. (a * b * c) / d = 1 |
| 100 3 201 103 | Enter the 4 numbers: 100 3 201 103 The max is 201. The min is 3. (a * b * c) / d = 585 |
Your output MUST match exactly the output and the input from above.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
