Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Needed some help on how to go about this only using material up to chapter 4, which includes Expressions and Interactivity (Chapter 3) and Making

image text in transcribed

Needed some help on how to go about this only using material up to chapter 4, which includes Expressions and Interactivity (Chapter 3) and Making Decisions (Chapter 4), as well as using switches. We cannot use Loops or global variables.

Goal: using switches Remember that you can look at the Lab 1 write-up if you are unsure of how to use Visual Studio Problem: A friend of yours is corresponding with someone from a country in where the metric system is used. This friend has trouble with converting distances. You are going to create a program to help your friend. This program should have 6 conversion choices: convert inches to centimeters, convert yards to meters, convert miles to kilometers, convert centimeters to inches, convert meters to yards, and convert kilometers to miles. The program should output be conversion choices with a,corresponding single letter or digit to represent the conversion (see partial menu below). Use asimple if to ensure the user enters one of the letters or digits. Enter your choice based on the following menu. A Convert inches to centimeters B. Convert yards to meters C. Convert miles to kilometers Next use a switch structure with 6 branches to prompt the user to enter the value to be converted, calculate the converted value, and output the entered value and converted value along with the units. You should assume that the user enters a valid distance to be converted. Do not use any ifs for selecting which conversion to complete. Output all values to 4 significant digits. Do not use any concepts beyond Chapter 4 of your textbook

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 And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 1 Lncs 8055

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013 Edition

3642402844, 978-3642402845

More Books

Students also viewed these Databases questions