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