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 Старата_библиотека
- {
- class Program
- {
- static void Main(string[] args)
- {
- string TarsenaKniga = Console.ReadLine();
- int KapacitetBiblioteka = int.Parse(Console.ReadLine());
- string Kniga = Console.ReadLine();
- int Br = 0;
- while (TarsenaKniga != Kniga && Br != KapacitetBiblioteka)
- {
- Kniga = Console.ReadLine();
- Br = Br + 1;
- }
- if (TarsenaKniga == Kniga)
- {
- Console.WriteLine($"You checked {Br} books and found it.");
- }
- if (Br == KapacitetBiblioteka)
- {
- Console.WriteLine("The book you search is not here!");
- Console.WriteLine($"You checked {Br} books.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment