Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Pesquisasimples
- {
- class Program
- {
- static void Main(string[] args)
- {
- bool loop = true;
- string[] array = new string[] {"Adamastor","Thiago","Alex","Biroliro" };
- for (int i=0;i<array.Length;i++) {
- Console.WriteLine(array[i]);
- }
- Console.ReadLine();
- while (loop == true)
- {
- Console.WriteLine("Pesquise um nome");
- string nomepesquisa = Console.ReadLine();
- for (int i = 0; i < array.Length; i++)
- {
- if (array[i].ToUpper().Contains(nomepesquisa.ToUpper()))
- {
- Console.WriteLine(" ");
- Console.WriteLine("Nome(s) encontrado(s): " + array[i]);
- }
- }
- Console.ReadLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement