Question: Develop a C program that receives as input a distance value, d, in inches and converts it to yards, feet, and inches (1 yard =


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 feet, 1 foot = 12 inches). Your program should: 1. Read a set of distances from a file called dist.txt 2. Use a function called distConverter to break distance to yards, feet, and inches. 3. Print the conversion result on screen in the main function (not within the distConverter function) The distConverter function prototype should be: void distConverter (int d, int *py, int *pf, int *pi) Sample Output dist.txt file: 130 19 4 12 337 162 0 inches: 130 19 . : yards feet inches 3 1 10 0 1 7 0 0 4 4. : 12 : 0 1 0 337 : 9 1 162 . 4 1 O O P : 0 main.c Load default template... 1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
