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(); } } }
or 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 ercises; 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 our 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 ith the column headings, and the left column should once again be left-justified. or this exercise your program must start at 76kph and increase by Skph each time, and show a total of exactly 10 lines not including the column headings nly 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 MPH 6.21 12.43 18.64 24.85 31.07 50 e following formula may be helpful: 1 mph-1?68934 kph If you still have difficulties, here are some tips when writing programs for AMS Do not write your program directly into the text box. You should copy and paste the sample code into Visual Studio, write your program there, run it and test it to make sure it works, then paste it into AMS. You only get a limited number of attempts at each AMS exercise, so make sure they count. Make sure your Main() function is declared public static void Main(). If your Main function is private, the code will still work in Visual Studio but it will not work in AMS If your code uses Console.ReadKey ); it should be replaced with Console.ReadLine();. ReadKey () will work in Visual Studio but not in AMS Make sure your code displays exactly what the problem asks you for. If you can, copy and paste the text you need to display into your function to avoid possible transcription errors. If there are any mistakes at all your code will not pass

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

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

How are Treasury regulations and revenue rulings different?

Answered: 1 week ago

Question

I felt sorry for the clerk.

Answered: 1 week ago

Question

7. What is coaching? Is there only one type of coaching? Explain.

Answered: 1 week ago