Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. public class Program
  8. {
  9. enum Plec {female, male, other}
  10.  
  11. static void Gender()
  12. {
  13. Plec x;
  14. x = (Plec)Enum.Parse(typeof(Plec), Console.ReadLine());
  15. Console.WriteLine("So your gender is " + x);
  16. }
  17. static void Gender(params string [] genders)
  18. {
  19. foreach (string y in genders)
  20. {
  21. Console.WriteLine("So your gender is " + y);
  22. }
  23. }
  24. public static void Main()
  25. {
  26. Console.WriteLine("What is your gender? male/female/other?");
  27. Gender(Console.ReadLine());
  28.  
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement