Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace itscoldoutside
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("poses leksis thes ?");
- int n = int.Parse(Console.ReadLine());
- string[] array = new string[n];
- Console.WriteLine("dose {0} lekseis", n);
- for (int i = 0; i < n; i++)
- {
- array[i] = Console.ReadLine();
- }
- Random rnd = new Random();
- int num = rnd.Next(0, n);
- string word = array[num];
- char[] guess = new char[word.Length];
- int lives = 6;
- Console.WriteLine("bale grama");
- for (int i = 0; i < guess.Length; i++)
- {
- guess[i] = '*';
- }
- while (true)
- {
- char inputWord = char.Parse(Console.ReadLine());
- for (int j = 0; j < word[j]; j++)
- {
- if (inputWord == word[j])
- {
- guess[j] = inputWord;
- }
- }
- Console.WriteLine(guess);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement