Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _01.OldBooks
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- string kniga = Console.ReadLine();
- int countT = 0;
- string segashnaKniga = Console.ReadLine();
- while (segashnaKniga != kniga)
- {
- if (segashnaKniga == "No More Books")
- {
- Console.WriteLine("The book you search is not here!");
- Console.WriteLine($"You checked {countT} books.");
- break;
- }
- countT++;
- segashnaKniga = Console.ReadLine();
- }
- if (segashnaKniga == kniga)
- {
- Console.WriteLine($"You checked {countT} books and found it.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement