Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions

Question

LO3 Name the seven categories of HR functions.

Answered: 1 week ago

Question

LO1 Understand human resource management and define human capital.

Answered: 1 week ago