Last active
August 29, 2015 14:15
-
-
Save archer884/f34ebb1686410eefaa9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace ConsoleApplication2 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var propertyValue = GetValidDecimalInput(); | |
var propertyTax = PropertyAssessment(propertyValue) * 0.0064m; | |
Console.WriteLine(propertyTax); | |
} | |
static decimal GetValidDecimalInput() | |
{ | |
decimal value; | |
while (!Decimal.TryParse(Console.ReadLine(), out value)) | |
{ | |
Console.WriteLine("Please enter a decimal value."); | |
} | |
return value; | |
} | |
static decimal PropertyAssessment(decimal value) | |
{ | |
return value * 0.6m; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment