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 mislim_si_cislo
- {
- class Program
- {
- static void Main(string[] args)
- {
- int cislo;
- int x, p;
- x = 50;
- p = 50;
- Console.WriteLine("Mysli si číslo od 1 do 100. Uhodnu ho");
- cislo = Console.Read();
- Console.ReadLine();
- while (cislo != 'a')
- {
- Console.WriteLine("Je to? {0}. Ano nebo Ne. a/n", x);
- cislo = Console.Read();
- if (cislo == 'n')
- {
- Console.WriteLine("doprdele, je větší nebo menší? v/n");
- }
- else if (cislo == 'v')
- {
- p = p / 2;
- x = x + p;
- }
- else if (cislo == 'm')
- {
- p = p / 2;
- x = x - p;
- }
- else if (cislo == 'a')
- {
- Console.WriteLine("Jo ty píčo mám tě. Věděl jsem to.");
- Console.ReadLine();
- }
- else
- {
- Console.WriteLine("Kokote Nechápu tě");
- }
- Console.ReadLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement