Question: ECE 175: Computer Programming for Engineering Applications Homework Assignment 6 Conventions: Name your C programs as hur.py.cwbere r corresponds to the homework number and y
ECE 175: Computer Programming for Engineering Applications Homework Assignment 6 Conventions: Name your C programs as hur.py.cwbere r corresponds to the homework number and y corresponds to the problem number. As an example the C program for hwl problem 1 should be named as hut.pi.c Submission Instructions: Use the dropbox on D2L to submit oaly the e files. 1 Distance Converter (20 points) Develop a C program that receives as input a distance value d in inches and converts it to yards, feet, and inches (1 yard 3 fet, 1 foot-12 inches). Your program should: 1. Read the distance value d from the keyboard 2. Use a function called dist.conv to break distance to yards, feet, and inches. 3. Print the result in the main function (not within the dist.comv function) The dist.conv function prototype should be void dist.conv(int d, int "p-y, int p.f, int "p.i) Sample Code Execution: Red text indicates information entered by the user Enter the distance in inches: 98 98 inches equal 2 yards, 2 feet, and 2 inches 2 Array Statistics (20 points) Write a program that returns the min, max and average value of an array of integers named data ar. Your program should call a single function that returns that mean, max and mean value of the array. The declaration of this function is given below void array-processing(int x, int size, int min.p, int "max.p, float mean.p) /x is a pointer to the first array element size is the array size min.p is a pointer to a var min in the main function that holds the min max.p is a pointer to a var max in the main function that holds the max mean-p is a pointer to a var mean in the main function that holds the mean
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
