Input closer to original

This commit is contained in:
Piotr Czajkowski
2022-01-02 14:50:51 +01:00
parent 64682e704c
commit b27ee11d00

View File

@@ -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))
{ {