Compare commits

...

4 Commits

Author SHA1 Message Date
Marcin Badurowicz
e559eb8f4b start translating 2024-10-11 09:10:42 +00:00
2dfb7826d3 Upgrade to .NET8 2024-10-11 09:03:29 +00:00
Marcin Badurowicz
fb59888b1c remove default name 2024-10-11 10:46:52 +02:00
Marcin Badurowicz
cb5fef531b fix null 2024-10-11 10:43:19 +02:00
2 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>

View File

@ -8,20 +8,20 @@ int guess;
int trials = 0; int trials = 0;
do do
{ {
Console.Write("Wprowadź wartość: "); Console.Write("Enter value: ");
guess = Convert.ToInt32(Console.ReadLine()); guess = Convert.ToInt32(Console.ReadLine());
if (guess > value) if (guess > value)
Console.WriteLine("Za dużo!"); Console.WriteLine("Za big!");
else if (guess < value) else if (guess < value)
Console.WriteLine("Za mało!"); Console.WriteLine("Za small!");
trials++; trials++;
} while (guess != value); } while (guess != value);
Console.WriteLine($"Wygrana w {trials} próbie!"); Console.WriteLine($"Wygrana w {trials} próbie!");
Console.Write("Podaj swoje imię: "); Console.Write("Podaj swoje imię: ");
var name = Console.ReadLine(); var name = Console.ReadLine()!;
var hs = new HighScore { Name = name, Trials = trials }; var hs = new HighScore { Name = name, Trials = trials };