Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp2
- {
- class Program
- {
- static void Main(string[] args)
- {
- string word = Console.ReadLine();
- bool y = word.EndsWith('y');
- bool oChSShXZ = word.EndsWith('o') || word.EndsWith("ch") || word.EndsWith('s') || word.EndsWith("sh") || word.EndsWith('x') || word.EndsWith('z');
- if (y)
- {
- Console.WriteLine(word.Remove(word.Length - 1) + "ies");
- }
- else if (oChSShXZ)
- {
- Console.WriteLine(word + "es");
- }
- else
- {
- Console.WriteLine(word + "s");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement