Remove unnecessary string formatting
This commit is contained in:
parent
74384ee253
commit
e6da7ff461
2 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ for (int i = 0; i < 10; i++)
|
|||
|
||||
while (true)
|
||||
{
|
||||
Console.Write($"Enter number to duplicate: ");
|
||||
Console.Write("Enter number to duplicate: ");
|
||||
if (int.TryParse(Console.ReadLine(), out duplicate))
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -18,14 +18,14 @@ int maximum;
|
|||
|
||||
while (true)
|
||||
{
|
||||
Console.Write($"Enter minimum age: ");
|
||||
Console.Write("Enter minimum age: ");
|
||||
if (int.TryParse(Console.ReadLine(), out minimum) || minimum >= 0 || minimum <= 130)
|
||||
break;
|
||||
}
|
||||
|
||||
while (true)
|
||||
{
|
||||
Console.Write($"Enter maximum age: ");
|
||||
Console.Write("Enter maximum age: ");
|
||||
if (int.TryParse(Console.ReadLine(), out maximum) || maximum >= minimum || maximum <= 130)
|
||||
break;
|
||||
}
|
||||
|
|
Reference in a new issue