Answer to Question #256006 in C# for Umar farouk

Question #256006
Write a program that converts pounds into kilograms. The program prompts the user to enter a number in pounds, converts it to kilograms, and displays the result. One pound is 0.454 kilograms.
1
Expert's answer
2021-10-25T14:50:25-0400
using System;
using System.Collections.Generic;


namespace App
{


    class Program
    {


        static void Main(string[] args)
        {
            Console.Write("Enter pounds: ");
            double pounds = double.Parse(Console.ReadLine());
            double kilograms = pounds * 0.454;
            Console.WriteLine("Kilograms: " + kilograms.ToString());
            Console.ReadLine();
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS