Question: Write a C program for a Kilometers to Miles conversion to run on ocelot. (1 Kilometer = 0.621371 Miles.) Create a nicely formatted chart
![]()

Write a C program for a Kilometers to Miles conversion to run on ocelot. (1 Kilometer = 0.621371 Miles.) Create a nicely formatted chart with the conversions of each of the following values from Kilometers to Miles. There is no user input, these values can be constants in the program. 2 55 402 1895 Columns should be aligned with numbers right justified and rounded to 2 digits after the decimal point. You do not need to include any grid lines, those are from Excel, but there is no deduction if you include them. The column headings should be centered. You should include a title line that says Convert centered at the top. This is a sample of a different conversion to show you how to align columns. Use formatting in the printf statement to align columns properly. Do not use spaces to push data around. Convert Kilometers 2.00 55.00 402.00 1895.00 Miles 1.24 34.18 249.79 1177.50 Create a simple Makefile to compile your program into an executable called convert. You should submit a compressed zip file named FirstNameLast NameL1.zip with the following files. 1. The source code, convert.c 2. The Makefile file which should be called Makefile with no extension. I should be able to type make at the command line to compile your program. 3. A screenshot of the output of the program running on ocelot (be sure the command line prompt shows.) The screenshot should just be a file named with your FirstNameLastName.png or .jpg. Do not include any other files or folders in the zipfile.
Step by Step Solution
3.34 Rating (163 Votes )
There are 3 Steps involved in it
C program for converting kilometers to miles and printing the output in a nicely formatted c... View full answer
Get step-by-step solutions from verified subject matter experts
