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 Word_in_Plural
- {
- class Program
- {
- static void Main(string[] args)
- {
- string word = Console.ReadLine();
- string[] arr = new string[]
- {
- "o",
- "ch",
- "s",
- "sh",
- "x",
- "z"
- };
- foreach (string s in arr)
- {
- if (word.EndsWith(s))
- {
- Console.WriteLine(word + "es");
- return;
- }
- }
- if (word.EndsWith("y")) {
- word = word.Remove(word.Length - 1);
- Console.WriteLine(word + "ies");
- }
- else {
- Console.WriteLine(word + "s");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement