/******************************************************/ /* Introduction to Programming */ /* By Dr. ANTF */ /* www.antf.net */ /* Copyright 2015 */ /* */ /* C# 333 - Test 1: Problem 2 */ /******************************************************/ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DOS { class Program { static void Main(string[] args) { float grams; Console.Write("Please enter a value in grams: "); grams = float.Parse(Console.ReadLine()); Console.WriteLine("\n\n{0} gr. ---> {1} Kg.", grams, grams / 1000f); if (grams <= 500) Console.WriteLine("\nVery Light"); else if (grams <= 1000) Console.WriteLine("\nLight"); else if (grams <= 3000) Console.WriteLine("\nMedium"); else if (grams <= 5000) Console.WriteLine("\nHeavy"); else Console.WriteLine("\nVery Heavy"); Console.ReadKey(); } } }