Compare commits
4 Commits
fe779369f4
...
e559eb8f4b
Author | SHA1 | Date | |
---|---|---|---|
|
e559eb8f4b | ||
2dfb7826d3 | |||
|
fb59888b1c | ||
|
cb5fef531b |
@ -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>
|
||||||
|
@ -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 };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user