Write a C program for a Kilometers to Miles conversion to run on ocelot. (1 Kilometer...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Answer rating: 100% (QA)
C program for converting kilometers to miles and printing the output in a nicely formatted c... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
In an applied research context you do not need to explain the relationships between the variables in your conceptual model. Discuss this statement.
-
Write a C program for this problem: FoodPanda delivery service wants to appraise their riders by adding increments to the basic salaries . The amount of increment depends upon the feedback points...
-
Write a C program for the Arduino Mega SBC which will monitor the keyboard for inputs of A, B, C, D, E, F, and G. Depending upon which key was pressed use the timer to generate a square wave on...
-
import java.util.ArrayList; import java.util.Map; import java.util.Set; import java.util.TreeMap; /* * * This class contains a map of string keys, representing professors, to an array list of...
-
Sole proprietorships account for 76 percent of all U.S. businesses and generate 6 percent of all business revenue. Only 18 percent of all sole proprietorships are incorporated, but they generate 90...
-
An investment of $10,000 has a geometric mean return of 0.1475 after 4 years. What is the value of the investment at the end of year four?
-
Discuss the distinctions among negligent torts, intentional torts, and strict liability.
-
The following is a list of account titles and amounts (dollars in millions) from a recent annual report of Hasbro, Inc., a leading manufacturer of games, toys, and interactive entertainment software...
-
Ariel files his tax return as married filing jointly ( MFJ ) . He runs a general store as a sole proprietor with no employees. In 2 0 2 3 , his qualified business income ( QBI ) of $ 2 0 0 , 0 0 0...
-
Easley-O?Hara Office Equipment sells furniture and technology solutions to consumers and to businesses. Most consumers pay for their purchases with credit cards and business customers make purchases...
-
You are considering an investment in Eicher Motors stock and wish to assess the firm's long - term debt - paying ability and its use of debt financing. All of the ratios can be used to assess...
-
*Real-time data provided by Federal Reserve Economic Data (FRED), Federal Reserve Bank of Saint Louis. Using the data from FRED, enter the values for the monetary aggregates indicated for the dates...
-
2. Consider the problem of forecasting the return on a portfolio comprised of two assets. The daily return on the portfolio is
-
Suppose that we have an economy with many identical households. There is government that exogenously consumes some output and pays for it with lump sum taxes. Lifetime utility for a household is: U...
-
The graphs below show the production possibility frontiers (PPFS) of Carolinia and Brodenstan, two countries that produce only coffee and bread. Initially-before specialization and trade-Carolinia...
-
THE recent closure of 16 light rail transit (LRT) stations between Ampang Park and Kelana Jaya on Nov 8 is causing people to suffer great difficulty. Almost 200,000 Klang Valley commuters are...
-
dy Compute for y=u3/2 and u = 2x + 3 using the chain rule formula dx The answer is dy dy du = dx du dx
-
What are bounds and what do companies do with them?
-
The variables r and represent polar coordinates. (a) Write each polar equation as an equation in rectangular coordinates (x,y). (b) Identify the equation and graph it. = /4
-
In problem, evaluate each expression. Do not use a calculator. ln e 2
-
In problem, solve each inequality algebraically. x - 3 >0 x + 1
-
When translating Acceletrons fi nancial statements into US dollars, Redline is least likely to use an exchange rate of USD per SGD: A . 0.671. B . 0.588. C . 0.654.
-
Based on Exhibit 1, what is the foreign exchange gain resulting from Transaction 3 on the December 31, 2016 fi nancial statements? A . NVK1.70 per ton B . NVK90.75 per ton C . NVK248.54 per ton
-
Which transaction would generate foreign currency transaction exposure for Ambleu? A . Transaction 1 B . Transaction 2 C . Transaction 3
Study smarter with the SolutionInn App