Advertisement
debono

Untitled

Sep 26th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. namespace Word_Plural
  2. {
  3. using System;
  4. public class StartUp
  5. {
  6. public static void Main(string[] args)
  7. {
  8. string input = Console.ReadLine();
  9. if (input.EndsWith("y") == true)
  10. {
  11. var output = input.Remove(input.Length - 1);
  12. Console.WriteLine($"{output}ies");
  13. }
  14.  
  15. else if
  16. (input.EndsWith("o") == true || input.EndsWith("ch") == true || input.EndsWith("s") == true
  17. || input.EndsWith("sh") == true || input.EndsWith("x") == true || input.EndsWith("z") == true)
  18. {
  19. Console.WriteLine($"{input}es");
  20. }
  21. else
  22. {
  23. Console.WriteLine($"{input}s");
  24. }
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement