meu primeiro commit carinhoso
This commit is contained in:
@@ -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