1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Bond [772]
3 years ago
12

Write a C# Console application that converts a mile into its equivalent metric kilometer measurement. The program asks the user

to input the value of miles to be converted and displays the original miles and the converted value . Test your code with inputs (1) 10 miles, (2) 3.25 miles.
Computers and Technology
1 answer:
zzz [600]3 years ago
4 0

Answer:

Following are the program in c#

using System;  // namespace system

using System.Collections.Generic;  // namespace collection

using System.Linq;

using System.Text;

namespace test // namespace

{

   class Program1 // class

   {        

                 

       static void Main(string[] args) // Main function

       {

           double nMiles, nKm;

           Console.Write("Enter Value In Miles : ");

           nMiles =Convert.ToDouble(Console.ReadLine());

           nKm = (nMiles / 0.62137);

           Console.WriteLine("Output:");

           Console.WriteLine("Value In Miles :" + nMiles);

           Console.WriteLine("Value In KM :" + nKm);

           Console.Read();

       }

   }

}

Output:

Case A-

Enter Value In Miles : 10

Value In Miles : 10

Value In KM : 16.09347

Case B-

Enter Values In Miles : 3.25

Value In Miles : 3.25

Value In KM : 5.230378

Explanation:

Here we take a input value in "nMiles" variable and converted into a Km. that will stored in "nkm" variable  . To convert miles into km we use  calculative formula Km=(miles/0.62137). This formula convert the entered value into km and finally print the value of miles and km miles variable.

You might be interested in
All of the following are simple steps for optimizing web page content except:
dangina [55]

Answer:

The correct answer is letter "B": segmenting computer servers to perform dedicated functions.

Explanation:

Computer segmentation refers to separating a server from the rest of the computers within the same network. The segmentation can separate one computer from others or groups of servers from one another. Thew type of segmentation will always depend on the device used to do the separation of the servers.

3 0
3 years ago
What kind of personal information are you comfortable sharing with others online? Why? What steps do you take to control how tha
GaryK [48]

Answer:

this is more of an opinion question regarding what you personally do

8 0
3 years ago
Read 2 more answers
Please help in computer subject​
VMariaS [17]

Answer:

6. Read this quote from Ben Hogan below the photograph.

purple

"People have always been telling me what I can't do. I guess I have wanted to show them.

That's been one of my driving forces all my life."

31

What does this quote mean? Use at least two direct quotes from the text that give

examples of this quote.

A

urn

Julie Bahn

3 0
3 years ago
Read 2 more answers
Why are medical coders using encoded software
EastWind [94]
To keep the medical records confidential otherwise, hackers would take advantage of them and sell them to the highest bidder 
3 0
3 years ago
In which state of matter is there no particle motion?
kiruha [24]
Solid is your answer for the day
6 0
3 years ago
Other questions:
  • An outdoor products company wants to test a new website design where customers can get information about their favorite outdoor
    6·1 answer
  • After a group sets a project schedule, members should be prepared to
    7·2 answers
  • Considering the traffic problem, do you think Rod handled the situation well?
    15·1 answer
  • Write a program that includes functions to calculate feet to inches, inches to feet, feet to yards, and yards to feet. Then, acc
    9·2 answers
  • Name three output devices
    6·1 answer
  • The light source for a typical silhouette is generally___________ the subject.
    12·2 answers
  • Building relationships during your career exploration is called A. clustering. B. futurecasting. C. matchmaking, D. networking.
    9·2 answers
  • Assume you are part of the systems development team at a medium-sized organization. The database will enable sales reps to have
    8·1 answer
  • _____ uses computer-generated, three-dimensional images to create the illusion of interaction in a real-world environment.
    8·1 answer
  • 2
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!