Remove unnecessary string formatting

This commit is contained in:
Stanislav Mykhailenko 2023-03-19 14:20:52 +02:00
parent 74384ee253
commit e6da7ff461
GPG key ID: 1E95E66A9C9D6A36
2 changed files with 3 additions and 3 deletions

View file

@ -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;
}

View file

@ -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;
}