meu primeiro commit carinhoso
This commit is contained in:
+62
@@ -0,0 +1,62 @@
|
||||
# =====================================
|
||||
# C# / .NET Console Application
|
||||
# =====================================
|
||||
|
||||
# Build outputs
|
||||
bin/
|
||||
obj/
|
||||
Debug/
|
||||
Release/
|
||||
[Bb]uild/
|
||||
publish/
|
||||
artifacts/
|
||||
|
||||
# Visual Studio
|
||||
.vs/
|
||||
*.user
|
||||
*.suo
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/tasks.json
|
||||
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
*.DotSettings.user
|
||||
|
||||
# NuGet packages
|
||||
*.nupkg
|
||||
*.snupkg
|
||||
packages/
|
||||
.nuget/
|
||||
|
||||
# Test results
|
||||
TestResults/
|
||||
coverage/
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# Logs and temporary files
|
||||
*.log
|
||||
*.tmp
|
||||
*.temp
|
||||
*.bak
|
||||
*~
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Local environment and secrets
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
appsettings.Development.json
|
||||
|
||||
# Generated files
|
||||
*.pdb
|
||||
*.cache
|
||||
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<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}") = "ConsoleApp1", "ConsoleApp1.csproj", "{99086CFB-A91A-4D60-902D-9A8AD60CCC32}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{99086CFB-A91A-4D60-902D-9A8AD60CCC32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{99086CFB-A91A-4D60-902D-9A8AD60CCC32}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{99086CFB-A91A-4D60-902D-9A8AD60CCC32}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{99086CFB-A91A-4D60-902D-9A8AD60CCC32}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,71 @@
|
||||
|
||||
namespace ConsoleApp1;
|
||||
|
||||
class Program
|
||||
{
|
||||
|
||||
static void System()
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Black;
|
||||
Console.WriteLine("Bem vindo CARO mundo!!!");
|
||||
Console.BackgroundColor = ConsoleColor.DarkRed;
|
||||
Console.WriteLine("Bom dia, Boa tarde e Boa noite .");
|
||||
}
|
||||
|
||||
static void Main()
|
||||
{
|
||||
Console.BackgroundColor = ConsoleColor.Red;
|
||||
Program.System();
|
||||
Program.Job();
|
||||
Program.Work();
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
for (; true;)
|
||||
|
||||
{
|
||||
|
||||
if (i < 10)
|
||||
{
|
||||
int n = i * 10;
|
||||
Program.Contador(n + 1,n + 10);
|
||||
i = i + 1;
|
||||
j = j + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
Console.WriteLine($"{i} {j}");
|
||||
|
||||
//minha ideia era deixar mais organizado o "Main" então deixei apenas "Program" nele
|
||||
}
|
||||
static void Job()
|
||||
{
|
||||
Console.BackgroundColor = ConsoleColor.Yellow;
|
||||
Console.WriteLine("para aqueles que ouviram as minhas palavras");
|
||||
Console.BackgroundColor = ConsoleColor.DarkYellow;
|
||||
Console.WriteLine("O meu anuncio é . . .");
|
||||
}
|
||||
|
||||
static void Work()
|
||||
{
|
||||
Console.BackgroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine("Agradeça por tudo que há em seu lar, pois nem sempre haverá algo .");
|
||||
Console.BackgroundColor = ConsoleColor.DarkGreen;
|
||||
string s = "Por isso chamamos o tempo atual de 1PR0SEN678 ";
|
||||
Console.WriteLine(s);
|
||||
//ideia de fazer com que cada linha tivesse cor e fosse em ordem das cores do arco-íris
|
||||
}
|
||||
|
||||
static void Contador(int inicio, int fim)
|
||||
{
|
||||
Console.BackgroundColor = ConsoleColor.DarkBlue;
|
||||
for (int i = inicio; i <= fim; i = i + 1)
|
||||
{
|
||||
Console.Write($" {i} ");
|
||||
}
|
||||
Console.WriteLine();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<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}") = "ConsoleApp2", "ConsoleApp2.csproj", "{541B4EC7-277F-45A0-AEBC-7EC74B2E191D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{541B4EC7-277F-45A0-AEBC-7EC74B2E191D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{541B4EC7-277F-45A0-AEBC-7EC74B2E191D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{541B4EC7-277F-45A0-AEBC-7EC74B2E191D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{541B4EC7-277F-45A0-AEBC-7EC74B2E191D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,46 @@
|
||||
namespace ConsoleApp2;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
int numerodetentativas = 0;
|
||||
Console.ForegroundColor = ConsoleColor.DarkGreen;
|
||||
Console.WriteLine("Qual o animal secreto?");
|
||||
string tentativa = Console.ReadLine();
|
||||
string animalsecreto = "gato";
|
||||
while (tentativa != "gato")
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkRed;
|
||||
Console.WriteLine("Errou!");
|
||||
tentativa = Console.ReadLine();
|
||||
numerodetentativas++;
|
||||
}
|
||||
Program.VerificarAnimal(tentativa, animalsecreto, numerodetentativas);
|
||||
}
|
||||
static bool VerificarAnimal(string tentativa, string animalsecreto, int numerodetentativas)
|
||||
{
|
||||
if (tentativa == animalsecreto)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine("Acertou!");
|
||||
Console.ForegroundColor = ConsoleColor.DarkBlue;
|
||||
Console.WriteLine($"Voce acertou em {numerodetentativas} tentativas");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImpostorQuem", "ImpostorQuem.csproj", "{D8C8AA1D-479C-4A64-94ED-86A7854F2CDC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D8C8AA1D-479C-4A64-94ED-86A7854F2CDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D8C8AA1D-479C-4A64-94ED-86A7854F2CDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D8C8AA1D-479C-4A64-94ED-86A7854F2CDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D8C8AA1D-479C-4A64-94ED-86A7854F2CDC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,139 @@
|
||||
namespace ImpostorQuem;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Cyan;
|
||||
Console.WriteLine("Fala o seu nome Detetive");
|
||||
string nome = Console.ReadLine();
|
||||
Console.ForegroundColor = ConsoleColor.DarkRed;
|
||||
Console.WriteLine("O IMPOSTOR está entre vocês! Tem 10 pessoas na Sala, Descubra o IMPOSTOR por numeros!");
|
||||
int Pessoas = int.Parse(Console.ReadLine());
|
||||
List<int> investigados = new List<int>();
|
||||
int impostorverdadeiro = 7;
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (investigados.Contains(Pessoas))
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkGray;
|
||||
Console.WriteLine($"Você já conversou com a pessoa numero {Pessoas}. Quer acusá-la?");
|
||||
string certeza = Console.ReadLine();
|
||||
|
||||
if (certeza == "Não" || certeza == "Nao")
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.White;
|
||||
Console.WriteLine("Escolha outra pessoa para investigar");
|
||||
Pessoas = int.Parse(Console.ReadLine());
|
||||
continue;
|
||||
}
|
||||
|
||||
if (certeza == "Sim" || certeza == "sim")
|
||||
{
|
||||
if (Pessoas == 7)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkGreen;
|
||||
Console.WriteLine($"Parabéns!!! O Detetive {nome} descobriu o IMPOSTOR");
|
||||
Environment.Exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine(
|
||||
$"você errou. A pessoa numero {Pessoas} era inocente. O verdadeiro IMPOSTOR te matou...");
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Pessoas == 1)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine(
|
||||
"A Primeira,afirmou q era inocente,e que provavelmente o IMPOSTOR é o quinto até o oitavo.");
|
||||
investigados.Add(1);
|
||||
|
||||
}
|
||||
else if (Pessoas == 2)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkBlue;
|
||||
Console.WriteLine(
|
||||
"A Segunda,falou berrando que a primeira e oitava pessoa estão mentindo(ela estava chorando.");
|
||||
investigados.Add(2);
|
||||
}
|
||||
else if (Pessoas == 3)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkMagenta;
|
||||
Console.WriteLine(
|
||||
"A Terceira,só falou que tinha certeza que o decimo era inocente(é o unico irmão dela,ela era mais velha.");
|
||||
investigados.Add(3);
|
||||
}
|
||||
else if (Pessoas == 4)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkCyan;
|
||||
Console.WriteLine(
|
||||
"A Quarta,falou q não podia falar comigo,pois ele mataria ela...(Ela falou q era melhor eu sair de perto dela.");
|
||||
investigados.Add(4);
|
||||
}
|
||||
else if (Pessoas == 5)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||
Console.WriteLine(
|
||||
"A Quinta,falou q era inocente e estava em choque ainda mas suspeita da Segunda(ela fala que a Segunda foi surbonada.");
|
||||
investigados.Add(5);
|
||||
}
|
||||
else if (Pessoas == 6)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
Console.WriteLine(
|
||||
"A Seis,está chorando no corpo so seu amigo falecido(não quis incomodar a pessoa em luto.");
|
||||
investigados.Add(6);
|
||||
}
|
||||
else if (Pessoas == 7)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkYellow;
|
||||
Console.WriteLine(
|
||||
"O Setimo,falou que era irmão mais velho da Terceira,e falou que eu podia falar com ela(ele está calmo demais e toda sua roupa é vermelha.)");
|
||||
investigados.Add(7);
|
||||
}
|
||||
else if (Pessoas == 8)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Magenta;
|
||||
Console.WriteLine(
|
||||
"A Oitava,falou que era vidente e que as caracteristicas denunciam o verdadeiro culpado(estranho.)");
|
||||
investigados.Add(8);
|
||||
}
|
||||
else if (Pessoas == 9)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Blue;
|
||||
Console.WriteLine(
|
||||
"A Nona,falou que a Oitava era inocente e que alguem mente mal(quem exatamente?)");
|
||||
investigados.Add(9);
|
||||
}
|
||||
else if (Pessoas == 10)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Black;
|
||||
Console.WriteLine("A decima,se suicidou na sua frente(qual foi o motivo?");
|
||||
investigados.Add(10);
|
||||
}
|
||||
|
||||
Console.WriteLine("Escolha outra pessoa para poder investigar. ");
|
||||
Pessoas = int.Parse(Console.ReadLine());
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<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}") = "Joguinho", "Joguinho.csproj", "{48ECC269-75FC-402A-A8E2-E40B9EF4E5F5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{48ECC269-75FC-402A-A8E2-E40B9EF4E5F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{48ECC269-75FC-402A-A8E2-E40B9EF4E5F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{48ECC269-75FC-402A-A8E2-E40B9EF4E5F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{48ECC269-75FC-402A-A8E2-E40B9EF4E5F5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,78 @@
|
||||
namespace Joguinho;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main( )
|
||||
{
|
||||
int ouro = 100;
|
||||
string item1 = "Poção";
|
||||
int item1quantidade = 3;
|
||||
int item1preço = 10;
|
||||
string item2 = "Espada";
|
||||
int item2quantidade = 1;
|
||||
int item2preço = 50;
|
||||
string item3 = "Escudo";
|
||||
int item3quantidade = 1;
|
||||
int item3preço = 30;
|
||||
int opção = 0;
|
||||
while (opção != 5)
|
||||
{
|
||||
Console.WriteLine(" DUNGEON INVENTORY " +
|
||||
" Heroi: Adventure " +
|
||||
" Vida: 70/100 " +
|
||||
" Ouro: 100 " +
|
||||
" " +
|
||||
"1.Olhar o inventario " +
|
||||
"2.Visitar o mercado " +
|
||||
"3.Explorar a Dungeon " +
|
||||
"4.Usar poção " +
|
||||
"5.Sair " +
|
||||
" " +
|
||||
"Escolhar uma ação:_");
|
||||
|
||||
if (opção == 1)
|
||||
{
|
||||
Program.OlharInventario(ouro,item1,item1quantidade,item2,item2quantidade,item3,item3quantidade);
|
||||
}
|
||||
else if (opção == 2)
|
||||
{
|
||||
Program.VisitarMercado(item1);
|
||||
}
|
||||
|
||||
opção = int.Parse(Console.ReadLine());
|
||||
}
|
||||
}
|
||||
|
||||
static void OlharInventario(int ouro,string item1,int item1quantidade,
|
||||
string item2,
|
||||
int item2quantidade,
|
||||
string item3,
|
||||
int item3quantidade)
|
||||
{
|
||||
Console.WriteLine($"Inventario Ouro = {ouro} " +
|
||||
$"{item1} = {item1quantidade} " +
|
||||
$"{item2} = {item2quantidade} " +
|
||||
$"{item3} = {item3quantidade} ");
|
||||
}
|
||||
|
||||
static void VisitarMercado(string item1)
|
||||
{
|
||||
int opção = 0;
|
||||
Console.WriteLine($"Mercado {item1}: 10 ouros " +
|
||||
$"1.Compre uma {item1} " +
|
||||
$"2.Sair do Mercado");
|
||||
if (opção == 1)
|
||||
{
|
||||
Console.WriteLine("Você tem uma poção a mais em seu inventario");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<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}") = "Mochila", "Mochila.csproj", "{28D620A3-FA08-4F99-AFBB-30C03F0C320D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{28D620A3-FA08-4F99-AFBB-30C03F0C320D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{28D620A3-FA08-4F99-AFBB-30C03F0C320D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{28D620A3-FA08-4F99-AFBB-30C03F0C320D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{28D620A3-FA08-4F99-AFBB-30C03F0C320D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,45 @@
|
||||
namespace Mochila;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
int opção = 0;
|
||||
int QuantidadedeItens = 0;
|
||||
while (opção != 3)
|
||||
{
|
||||
Console.WriteLine($"""
|
||||
|
||||
=== mochila ===
|
||||
1 - Adicionar item
|
||||
2 - Mostrar quantidade de itens
|
||||
3 - Sair
|
||||
""");
|
||||
opção = int.Parse(Console.ReadLine());
|
||||
|
||||
if (opção == 1)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkGreen;
|
||||
Console.WriteLine("Qual item voce encontrou?");
|
||||
string objeto = Console.ReadLine();
|
||||
Console.WriteLine($"{objeto} foi colocado na Mochila");
|
||||
QuantidadedeItens++;
|
||||
|
||||
|
||||
}
|
||||
else if (opção == 2)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkGreen;
|
||||
Program.MostrarMochila(Qtde:QuantidadedeItens);
|
||||
}
|
||||
}
|
||||
Console.WriteLine("Até mais!");
|
||||
}
|
||||
static void MostrarMochila(int Qtde)
|
||||
{
|
||||
Console.WriteLine($"{Qtde} itens na mochila");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
namespace Qual_a_senha;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkBlue;
|
||||
Console.WriteLine("Digite a senha:");
|
||||
string senha = Console.ReadLine();
|
||||
string senhasecreta = "dragao";
|
||||
while (senha != senhasecreta)
|
||||
{
|
||||
if (senha != senhasecreta)
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine("...Senha invalida");
|
||||
senha = Console.ReadLine();
|
||||
}
|
||||
|
||||
Program.VerificarSenha(senha);
|
||||
|
||||
}
|
||||
|
||||
static bool VerificarSenha(string senha)
|
||||
{
|
||||
string senhasecreta = "dragão";
|
||||
if (senha == "dragao")
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkGreen;
|
||||
Console.WriteLine($"Senha correta {senhasecreta} Acesso Permitido");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>Qual_a_senha</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}") = "Qual a senha", "Qual a senha.csproj", "{07A9DE66-08E6-4100-8A11-C014BB9416ED}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{07A9DE66-08E6-4100-8A11-C014BB9416ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{07A9DE66-08E6-4100-8A11-C014BB9416ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{07A9DE66-08E6-4100-8A11-C014BB9416ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{07A9DE66-08E6-4100-8A11-C014BB9416ED}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,41 @@
|
||||
namespace RPG;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
Program.MostrarPersonagem();
|
||||
}
|
||||
static void MostrarPersonagem()
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine("Digite seu nome:");
|
||||
string nome = Console.ReadLine();
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine("=== Escolha Uma CLASSE: 1 - GUERREIRO 2 - MAGO 3 - ARQUEIRO");
|
||||
int classe = int.Parse(Console.ReadLine());
|
||||
while (classe < 1 || classe > 3)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine("CLASSE INVALIDA");
|
||||
classe = int.Parse(Console.ReadLine());
|
||||
}
|
||||
|
||||
if (classe == 1)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkBlue;
|
||||
Console.WriteLine($"{nome} é um GUERREIRO");
|
||||
}
|
||||
else if (classe == 2)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkBlue;
|
||||
Console.WriteLine($"{nome} é um MAGO");
|
||||
}
|
||||
else if (classe == 3)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkBlue;
|
||||
Console.WriteLine($"{nome} é um ARQUEIRO");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RPG", "RPG.csproj", "{17474D7A-6F35-48B2-B0B4-C09FA13E0DEC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{17474D7A-6F35-48B2-B0B4-C09FA13E0DEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{17474D7A-6F35-48B2-B0B4-C09FA13E0DEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{17474D7A-6F35-48B2-B0B4-C09FA13E0DEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{17474D7A-6F35-48B2-B0B4-C09FA13E0DEC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -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
|
||||
@@ -0,0 +1,46 @@
|
||||
namespace good_numbers;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
Console.WriteLine("vamos contar de 1 até...10!!!");
|
||||
Pensador(1, 10);
|
||||
|
||||
int numero = 10;
|
||||
while (numero >= 1)
|
||||
{
|
||||
Console.WriteLine(numero);
|
||||
numero--;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void Pensador(int inicio, int final)
|
||||
{
|
||||
if (inicio % 2 != 0)
|
||||
{
|
||||
inicio++;
|
||||
}
|
||||
for (int i = inicio; i <= final; i += 2)
|
||||
{
|
||||
|
||||
Console.WriteLine(i);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void F1()
|
||||
{
|
||||
Pensador
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>good_numbers</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}") = "good numbers", "good numbers.csproj", "{41AEBE57-5AAE-4513-87C5-9A186A0FC8CC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{41AEBE57-5AAE-4513-87C5-9A186A0FC8CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{41AEBE57-5AAE-4513-87C5-9A186A0FC8CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{41AEBE57-5AAE-4513-87C5-9A186A0FC8CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{41AEBE57-5AAE-4513-87C5-9A186A0FC8CC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,36 @@
|
||||
namespace menu_do_jogo;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
Console.WriteLine("=== MEU JOGO === 01- jogar 02- ver creditos 03- sair Escolha:");
|
||||
string escolha = Console.ReadLine();
|
||||
while (escolha != "3")
|
||||
{
|
||||
if (escolha == "1")
|
||||
{
|
||||
Program.Jogar();
|
||||
escolha = Console.ReadLine();
|
||||
}
|
||||
else if (escolha == "2")
|
||||
{
|
||||
Program.MostrarCreditos();
|
||||
escolha = Console.ReadLine();
|
||||
}
|
||||
else if (escolha == "3") ;
|
||||
}
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine("Até Mais!");
|
||||
}
|
||||
static void Jogar()
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkGreen;
|
||||
Console.WriteLine("O Jogo Começou!");
|
||||
}
|
||||
static void MostrarCreditos()
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkBlue;
|
||||
Console.WriteLine("Jogo criado por Josué");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>menu_do_jogo</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}") = "menu do jogo", "menu do jogo.csproj", "{3203A514-2734-4E62-9534-E16DAF5D5D9B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{3203A514-2734-4E62-9534-E16DAF5D5D9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3203A514-2734-4E62-9534-E16DAF5D5D9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3203A514-2734-4E62-9534-E16DAF5D5D9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3203A514-2734-4E62-9534-E16DAF5D5D9B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,38 @@
|
||||
namespace passa_tempo;
|
||||
|
||||
class Program
|
||||
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
|
||||
Print("Qual o seu nome?");
|
||||
string? nome = Console.ReadLine();
|
||||
Print("Qual sua idade?");
|
||||
int idade = int.Parse(Console.ReadLine()!);int idadefinal = 100;
|
||||
if (idade >= idadefinal)
|
||||
|
||||
{
|
||||
Print("ERRO LIMITE DE IDADE", ConsoleColor.DarkRed);
|
||||
return;
|
||||
}
|
||||
Print("ok anotando...", ConsoleColor.Green);
|
||||
Print($"Olá {nome}! Você tem {idade} anos.", ConsoleColor.DarkGreen);
|
||||
if (idade < 18) Print("Você é menor de idade", ConsoleColor.Red);
|
||||
else Print("Você é maior de idade", ConsoleColor.Green);
|
||||
|
||||
}
|
||||
|
||||
static void Print(string s, ConsoleColor color = ConsoleColor.White)
|
||||
{
|
||||
Console.ForegroundColor = color;
|
||||
Console.WriteLine(s);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<RootNamespace>passa_tempo</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}") = "passa tempo", "passa tempo.csproj", "{70015DCD-6269-4AF5-B3FA-9C201EBBC042}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{70015DCD-6269-4AF5-B3FA-9C201EBBC042}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{70015DCD-6269-4AF5-B3FA-9C201EBBC042}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{70015DCD-6269-4AF5-B3FA-9C201EBBC042}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{70015DCD-6269-4AF5-B3FA-9C201EBBC042}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user