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
Which of the following statements about meta tags is TRUE?
Iteru [2.4K]

Answer:

I guess c no. is the answer

6 0
3 years ago
Read 2 more answers
If we have the following array/list:
oee [108]

Answer:

The correct answer is A) "red"

Explanation:

Using arrays and lists are very helpful when writing programs. They help simplify programs by storing <u>related data</u> under one name.

In the question above the general name is <u>myList</u>. <em>The related data are red, orange, yellow, green, blue, indigo, and violet.</em>

This means that myList contains values a,b,c,d,e,f, and g. However myList[1] only contains value "red".

Cheers!

4 0
3 years ago
Read 2 more answers
When data is being prepared for transmission onto the network, it is broken into small pieces and a header and trailer are added
Archy [21]

Answer:

The correct answer to the following question will be "Encapsulation".

Explanation:

  • Encapsulation relates to the pooling of data with techniques used by the database or the limitation of immediate access to many of the elements of the entity.
  • As data is being processed for transfer to the network, it's split into tiny pieces and a trailer and header are attached to each piece to help determine it.
  • It is a method of shielding data facts and preserving the object's data and actions from abuse by certain objects.

Therefore, Encapsulation is the right answer.

8 0
3 years ago
What is the right thing to do when you spot fake news​
LUCKY_DIMON [66]

Answer:

to tell the truth

Explanation:

l mean there is no reason to keep it secret

6 0
3 years ago
3
Aneli [31]

Answer:

he can use microosoft word, gooogle docs/slides, or any old tech because it will present from any

Explanation:

3 0
3 years ago
Other questions:
  • Taking a suitable example in c language explain the of call by value and call by reference concepts.
    7·1 answer
  • ) How many switching functions of two variables (x and y) are there?
    11·1 answer
  • What is one benefit of using electronic sticky notes ?
    9·2 answers
  • The most important task in developing a new computer system/app is to: a) choose the most current technologies such as operating
    5·1 answer
  • Develop a program that will maintain an ordered linked list of positive whole numbers. Your program will provide for the followi
    13·1 answer
  • An alarm clock draws 0.5 A of current when connected to a 120 volt circuit. Calculate its resistance.
    10·1 answer
  • What are some of the functions in the Consolidate dialog box? Check all that apply.
    6·1 answer
  • You are writing a program using the Java language. Which of the following is a requirement of Java syntax?
    6·1 answer
  • Question in file i need this work done tonight
    10·1 answer
  • Which component is most likely to allow physical and virtual machines to communicate with each other?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!