Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Console.Write("Enter array`s lenghts: ");
- int n = int.Parse(Console.ReadLine());
- string[] books = new string[n];
- string[] authors = new string[n];
- for (int i = 0; i < books.Length; i++)
- {
- Console.WriteLine("The name of the book: ");
- books[i] = Console.ReadLine();
- Console.WriteLine("The name of the author: ");
- authors[i] = Console.ReadLine();
- }
- for (int i = 0; i < books.Length; i++)
- {
- if (authors[i].Trim().ToLower()=="ivan vazov")
- {
- Console.WriteLine("The book is {0} by the author {1}.",books[i],authors[i]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement