logo image

C# program to convert kilograms to grams

Views: 100

Following program shows you how to convert kilograms to grams. In this program we get kilograms from user, once we get those we need to multiply with 1000 so that we get in grams

using System;

class MainClass {
  public static void Main (string[] args) {
    Console.WriteLine ("Please enter kilograms:");
    double kilograms = Convert.ToDouble(Console.ReadLine());
    double grams = kilograms * 1000;
    Console.WriteLine(grams + " Grams");


Please enter kilograms:
10000 Grams
We are looking for Interns!
Send your resumes to
[email protected]