Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _2._6
- {
- class Program
- {
- static void Main(string[] args)
- {
- int count = 0;
- string rightAnswer = "без названия";
- while (count < 3)
- {
- Console.WriteLine("Без чего ничего никогда не бывает?");
- string answer = Console.ReadLine();
- if (rightAnswer == answer.ToLower())
- {
- Console.WriteLine("Правильно!");
- break;
- }
- else if (answer.ToLower() == "сдаюсь")
- {
- Console.WriteLine("Правильный ответ: " + rightAnswer);
- break;
- }
- else
- {
- if (count < 2)
- {
- Console.WriteLine("Подумай еще");
- count++;
- }
- else
- {
- count++;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement