Skip to content

Commit 4affe58

Browse files
committed
Added some descriptions
1 parent e9b4a46 commit 4affe58

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎22_Change/csharp/Program.cs‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ namespace Change
44
{
55
class Program
66
{
7+
/// <summary>
8+
/// Prints header.
9+
/// </summary>
710
static void Header()
811
{
912
Console.WriteLine("Change".PadLeft(33));
@@ -17,6 +20,14 @@ static void Header()
1720
Console.WriteLine();
1821
}
1922

23+
/// <summary>
24+
/// Gets user input for price and payment.
25+
/// </summary>
26+
/// <returns>
27+
/// False if any input can't be parsed to double. Price and payment returned would be 0.
28+
/// True if it was possible to parse inputs into doubles. Price and payment returned
29+
/// would be as provided by the user.
30+
/// </returns>
2031
static (bool status, double price, double payment) GetInput()
2132
{
2233
Console.WriteLine("Cost of item? ");
@@ -38,6 +49,10 @@ static void Header()
3849
return (true, price, payment);
3950
}
4051

52+
/// <summary>
53+
/// Prints bills and coins for given change.
54+
/// </summary>
55+
/// <param name="change"></param>
4156
static void PrintChange(double change)
4257
{
4358
var tens = (int)(change / 10);

0 commit comments

Comments
 (0)