Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 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. namespace ConsoleApp6
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string word = Console.ReadLine();
  14. if (word.EndsWith("y"))
  15. {
  16. word.Replace("y", "ies");
  17. Console.WriteLine(word);
  18. }
  19. else if (word.EndsWith("o"))
  20. {
  21. word.Replace("0", "es");
  22. Console.WriteLine(word);
  23. }
  24. else if (word.EndsWith("ch"))
  25. {
  26. word.Replace("ch", "es");
  27. Console.WriteLine(word);
  28. }
  29. else if (word.EndsWith("s"))
  30. {
  31. word.Replace("s", "es");
  32. Console.WriteLine(word);
  33. }
  34. else if (word.EndsWith("sh"))
  35. {
  36. word.Replace("sh", "es");
  37. Console.WriteLine(word);
  38. }
  39. else if (word.EndsWith("x"))
  40. {
  41. word.Replace("x", "es");
  42. Console.WriteLine(word);
  43. }
  44. else if (word.EndsWith("z"))
  45. {
  46. word.Replace("z", "es");
  47. Console.WriteLine(word);
  48. }
  49. else
  50. {
  51. Console.WriteLine($"{word}s");
  52. }
  53. }
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement