Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace myslim_si_znak
- {
- class Program
- {
- static void Main(string[] args)
- {
- int cislo, cifra;
- int x;
- cislo = 0;
- x = 54;
- while (cislo != x)
- {
- Console.WriteLine("Myslím si dvouciferné číslo, uhodni ho.");
- cifra = Console.Read();
- while ((cifra >= '0') && (cifra <= '9'))
- {
- cislo = cislo * 10 + cifra - '0';
- cifra = Console.Read();
- }
- Console.WriteLine("nacetl jsem {0} pane", cislo);
- if (cislo > 99)
- {
- Console.WriteLine("Kokote, řekl jsem dvouciferné číslo");
- cislo = cislo - cislo;
- }
- else if (cislo < x)
- {
- Console.WriteLine("myslím si vyšší číslo");
- cislo = cislo - cislo;
- }
- else if (cislo > x)
- {
- Console.WriteLine("myslím si menšší číslo");
- cislo = cislo - cislo;
- }
- else
- {
- Console.WriteLine("Správně ty senzibile mé číslo je {0}", x);
- Console.ReadLine();
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement