mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 07:10:42 -08:00
Input closer to original
This commit is contained in:
@@ -30,7 +30,7 @@ namespace Change
|
|||||||
/// </returns>
|
/// </returns>
|
||||||
static (bool status, double price, double payment) GetInput()
|
static (bool status, double price, double payment) GetInput()
|
||||||
{
|
{
|
||||||
Console.WriteLine("Cost of item? ");
|
Console.Write("Cost of item? ");
|
||||||
var priceString = Console.ReadLine();
|
var priceString = Console.ReadLine();
|
||||||
if (!double.TryParse(priceString, out double price))
|
if (!double.TryParse(priceString, out double price))
|
||||||
{
|
{
|
||||||
@@ -38,7 +38,7 @@ namespace Change
|
|||||||
return (false, 0, 0);
|
return (false, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Console.WriteLine("Amount of payment? ");
|
Console.Write("Amount of payment? ");
|
||||||
var paymentString = Console.ReadLine();
|
var paymentString = Console.ReadLine();
|
||||||
if (!double.TryParse(paymentString, out double payment))
|
if (!double.TryParse(paymentString, out double payment))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user