Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class wordInPlural
- {
- static void Main()
- {
- string noun = Console.ReadLine();
- string plural = null;
- if (noun.EndsWith("y"))
- {
- plural = noun.Replace("y", "ies");
- Console.WriteLine(plural);
- }
- else if (noun.EndsWith("o") || noun.EndsWith("ch") || noun.EndsWith("s") || noun.EndsWith("x")|| noun.EndsWith("z"))
- {
- noun = noun + "es";
- Console.WriteLine(noun);
- }
- else
- {
- noun = noun + "s";
- Console.WriteLine(noun);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement