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;
- // naam + voornaam: Janssens Gerd
- // groep: 1ITF5
- // studentennummer: r0370181
- // uniek nummer: 5065839
- namespace Proeftest
- {
- class Program
- {
- static void Main(string[] args)
- {
- //Declaraties
- //string stop;
- //lijnen maken
- string lijn = "";
- string namen;
- List<string> namenLijst = new List<string>();
- for (int i = 1; i <= 30; i++)
- {
- lijn = lijn + "*";
- }
- //Kleuren
- Console.BackgroundColor = ConsoleColor.White;
- Console.ForegroundColor = ConsoleColor.Black;
- Console.Clear();
- Console.Title = "Gerd Janssens";
- Console.BackgroundColor = ConsoleColor.White;
- Console.ForegroundColor = ConsoleColor.Blue;
- Console.Clear();
- Console.WriteLine(lijn);
- Console.WriteLine(" " + "\"WELKOM\"");
- Console.WriteLine(lijn);
- Console.WriteLine();
- Console.Write("Geef de naam van je vriend(in)" + "(\"stop\" om te stoppen): ");
- namen = Console.ReadLine();
- do
- {
- //studenten toevoegen aan lijst met geslaagden
- if (namen != "")
- {
- namenLijst.Add(namen);
- }
- //opnieuw inlezen kritieke waarde
- Console.Write("Geef de naam van je vriend(in)" + "(\"stop\" om te stoppen): ");
- namen = Console.ReadLine();
- } while (namen != "stop");
- if (namen == "stop")
- {
- Console.BackgroundColor = ConsoleColor.Red;
- Console.ForegroundColor = ConsoleColor.White;
- Console.Clear();
- Console.Title = "Overzicht";
- Console.WriteLine();
- foreach (string item in namenLijst)
- {
- Console.WriteLine(item);
- }
- Console.WriteLine();
- Console.WriteLine("Druk op een toets...");
- Console.WriteLine();
- Console.ReadLine();
- }
- //
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement