mirror of
https://github.com/danbulant/databaze-ukolu-pro-pana-Malyho
synced 2026-05-24 12:45:57 +00:00
Add files via upload
This commit is contained in:
parent
1c939adef5
commit
9cf8bb6cef
1 changed files with 38 additions and 0 deletions
38
1.K/HW.1 PŘIVÍTÁNÍ/přivítání.cs
Normal file
38
1.K/HW.1 PŘIVÍTÁNÍ/přivítání.cs
Normal 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}.");
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue