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
What type of edge does UML use to denote interface implementation? Group of answer choices A dotted arrow from the interface to
Feliz [49]

Answer:

<em>A. A dotted arrow from the class to the interface terminated with a triangular tip</em>

Explanation:

3 0
3 years ago
Different units of CPU ?
deff fn [24]
The two typical components of a CPU include the following:<span>--The arithmetic logic unit (ALU), which performs arithmetic and logical operations. --<span>The control unit (CU), which extracts instructions from memory and decodes and executes them, calling on the ALU when necessary.</span></span>
3 0
3 years ago
If you are planning to carry a large balance on your credit card, which of the following credit card features should you look fo
fredd [130]
You should use an American Express.
5 0
3 years ago
In the context of firewall as a nonbiometric security measure, a _____ is software that acts as an intermediary between two syst
irga5000 [103]

Answer:

Proxy Server                        

Explanation:

  • Proxy server is a server that acts as a mediator between two systems.
  • One system can be your computer and the other can be the server to which you are asking a service, such as requesting a web page.
  • Lets suppose you request a web page from a server and you type a URL of a website to access a web page.
  • This request goes to proxy server which sends this request on your behalf to the target server in order to retrieve that web page.
  • Proxy server makes this request to the target server on the internet by using one of its IP addresses.
  • When the proxy server gets that web page, it will forward that web page to your requesting computer.
  • If you request a specific service such as a website frequently the proxy server saves that website on its cache.
  • So if you request that website again, proxy server will forward it to you from its cache rather than requesting it again from the target server on your behalf resulting in quick response to the user's request.
  • Proxy servers provide users with privacy to access the websites, and they can surf the internet anonymously .
8 0
3 years ago
Write the definition of a function, is_reverse, whose two parameters are arrays of integers of equal size. The function returns
Alisiya [41]

Answer:

def is_reverse(lst1, lst2):

   lst2 = lst2[::-1]

   if lst1 == lst2:

       return True

   else:

       return False

Explanation:

Create a function called is_reverse that takes two parameters, lst1 and lst2

Reverse the second list using slicing

Check if the first list and the second list are equal to each other. If they are, return True. Otherwise, return False

4 0
3 years ago
Other questions:
  • Dial-up connections can be made over a(n) ____ line or phone line. isdn dsl ipx tcp/ip
    12·1 answer
  • How much do taxis coast?
    14·2 answers
  • What word can you spell with the letters e, e, a, m, g, t, and k?
    10·1 answer
  • List three components of a computer system​
    10·1 answer
  • ________ is an encryption standard used for secure transactions such as credit card processing and online banking. TLS DMZ White
    14·1 answer
  • Hard and soft skills can both be transferable skills. *<br><br> True<br><br> False
    5·2 answers
  • Heres a survey
    7·2 answers
  • HOW TO CHANGE GRADE IN SKYWARD!!
    10·1 answer
  • 1. Encrypt this binary string into cipher text: 110000. Include in your answer the formula the
    10·1 answer
  • Select the correct text in the passage.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!