Question: SAMPLE CODE: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SpeedConversion { class MilesPerHourTable { public static void Main() { // Write your code

 SAMPLE CODE: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace

SAMPLE CODE:

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SpeedConversion { class MilesPerHourTable { public static void Main() { // Write your code to create the KPH to MPH table here Console.WriteLine(" Hit Enter to exit."); Console.ReadLine(); } } }

For this exercise, you are asked to write a program to create a table for converting from kilometres per hour to miles per hour. This is similar to Activity 2 from the tutorial exercises; however, be mindful of the details! The exercise has been changed slightly for the AMS Write a program that first displays the column headings of the two units of speed you are asked to convert between. The leftmost column must be justified to the left side of the screen Your program should then display a number of lines, showing the speed you are converting from and the speed you are converting to on each line. These should be spaced to line up with the column headings, and the left column should once again be left-justified For this exercise your program must start at 57kph and increase by 14kph each time, and show a total of exactly 13 lines not including the column headings Only show values to 2 decimal places As an example, if you were asked to start at 10kph and increase by 10kph each time, and show a total of five lines, your table would look like this KPH 10 20 30 40 50 MPH 6.21 12.43 18.64 24.85 31.07 The following formula may be helpful: 1 mph1.60934kplh If you still have difficulties, here are some tips when writing programs for AMS

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!