You will round to dollars, round to hundreds of dollars, always round down, and always round up.
using System; class Program{// w w w .j a va 2 s. c om static void Main(string[] args){ // Input Console.Write("Enter (decimal) amount in dollars: "); string input = Console.ReadLine(); double amount = Convert.ToDouble(input); // To dollars double nearest = Math.Round(amount); double alwaysDown = Math.Floor(amount); double alwaysUp = Math.Ceiling(amount); Console.WriteLine("To dollars"); Console.WriteLine("Nearest : " + nearest); Console.WriteLine("Always down: " + alwaysDown); Console.WriteLine("Always up : " + alwaysUp); // To cents nearest = Math.Round(amount, 2); alwaysDown = Math.Floor(100 * amount) / 100; alwaysUp = Math.Ceiling(100 * amount) / 100; Console.WriteLine("To cents"); Console.WriteLine("Nearest : " + nearest); Console.WriteLine("Always down: " + alwaysDown); Console.WriteLine("Always up : " + alwaysUp); // To hundreds of dollars nearest = 100 * Math.Round(amount / 100); alwaysDown = 100 * Math.Floor(amount / 100); alwaysUp = 100 * Math.Ceiling(amount / 100); Console.WriteLine("To hundreds of dollars"); Console.WriteLine("Nearest : " + nearest); Console.WriteLine("Always down: " + alwaysDown); Console.WriteLine("Always up : " + alwaysUp); } }