Advertisement
vasildiavolo

Untitled

Mar 20th, 2018
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp2
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string word = Console.ReadLine();
  10.  
  11. bool y = word.EndsWith('y');
  12. bool oChSShXZ = word.EndsWith('o') || word.EndsWith("ch") || word.EndsWith('s') || word.EndsWith("sh") || word.EndsWith('x') || word.EndsWith('z');
  13.  
  14. if (y)
  15. {
  16. Console.WriteLine(word.Remove(word.Length - 1) + "ies");
  17. }
  18. else if (oChSShXZ)
  19. {
  20. Console.WriteLine(word + "es");
  21. }
  22. else
  23. {
  24. Console.WriteLine(word + "s");
  25. }
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement