Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Maand
- {
- class Program
- {
- static void Main()
- {
- Program myprogram = new Program();
- myprogram.Start();
- }
- void Start()
- {
- PrintMaanden();
- VraagMaand("Voer een maandnummer in: ");
- }
- void PrintMaand(Maand maand)
- {
- Console.WriteLine(maand);
- }
- void PrintMaanden()
- {
- for (Maand i = Maand.Januari; i <= Maand.December; i++)
- {
- int teller = 1;
- Console.WriteLine("{0}. {1}", teller, i);
- }
- }
- Maand VraagMaand(string vraag)
- {
- Console.Write(vraag);
- int maandnum = int.Parse(Console.ReadLine());
- PrintMaand((Maand)maandnum);
- return (Maand)maandnum;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement