meu primeiro commit carinhoso
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
namespace esconde_esconde;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
Console.WriteLine("Qual o seu nome?");
|
||||
string? nome = Console.ReadLine();
|
||||
Console.WriteLine(" Vamos jogar um jogo,escreva o numero SECRETO DE 0 ATÉ 20");
|
||||
int numerosecreto = 7;
|
||||
int numerodousuario = int.Parse(Console.ReadLine());
|
||||
while (numerodousuario != numerosecreto)
|
||||
{
|
||||
if (numerodousuario <= 5)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine("BAIXO");
|
||||
}
|
||||
|
||||
if (numerodousuario == 6)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine("BAIXINHO");
|
||||
}
|
||||
|
||||
if (numerodousuario == 8)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine("ALTINHO");
|
||||
}
|
||||
|
||||
if (numerodousuario >= 9)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine("ALTO");
|
||||
}
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.DarkRed;
|
||||
Console.WriteLine("ERROU, TENTE DENOVO ,por favor");
|
||||
Console.ForegroundColor = ConsoleColor.White;
|
||||
numerodousuario = int.Parse(Console.ReadLine());
|
||||
}
|
||||
if (numerodousuario == numerosecreto)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkGreen;
|
||||
Console.WriteLine($"PARABENS,{nome} ACERTOU O NUMERO SECRETO");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>esconde_esconde</RootNamespace>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "esconde esconde", "esconde esconde.csproj", "{6430F371-D942-4DE2-BC80-FF55D1F07622}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6430F371-D942-4DE2-BC80-FF55D1F07622}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6430F371-D942-4DE2-BC80-FF55D1F07622}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6430F371-D942-4DE2-BC80-FF55D1F07622}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6430F371-D942-4DE2-BC80-FF55D1F07622}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user