Advertisement
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 ConsoleApplication52
- {
- class Program
- {
- static void Main(string[] args)
- {
- List<string> CreweFC = new List<string>();
- Console.WriteLine("Welcome to the Crewe FC data base. Please add a player");
- CreweFC.Add(Console.ReadLine());
- for ( int x =0; x<10; x++ )
- {
- Console.WriteLine("Please add your next player");
- CreweFC.Add(Console.ReadLine());
- }
- Console.Clear();
- Console.WriteLine("Would you like to view your team?");
- string option = Console.ReadLine();
- if (option == "yes")
- {
- foreach(string item in CreweFC)
- {
- Console.WriteLine(item);
- }
- Console.WriteLine("Total players on team = " + CreweFC.Count);
- }
- else
- {
- Console.WriteLine("Press enter to exit");
- Console.ReadLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement