Add files via upload

This commit is contained in:
teolord 2021-10-31 16:14:49 +01:00 committed by GitHub
parent 19995470e8
commit 975c50f742
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

38
1.K/přivítání.cs Normal file
View file

@ -0,0 +1,38 @@
using System;
namespace PVAukol
{
class Program
{
static void Main(string[] args)
{
int cas = DateTime.Now.Hour;
Console.Write("Vaše jméno: ");
string jmeno = Console.ReadLine();
string doba;
if (cas < 12)
{
doba = "rána";
}
else if(cas >= 12 && cas < 18)
{
doba = "odpoledne";
}
else
{
doba = "večera";
}
Console.WriteLine($"Dobrého {doba}, ti přeji {jmeno}.");
}
}
}