Check out example codes for "accept the noun and the output of plural c++". It will help you in understanding the concepts better.

Code Example 1

noun = getnoun();

// case a/b?
if (lastletterof(noun)=='y')
{ 
   if (isconsonant(onebutlastletter(noun)) 
   {
      // case a!
      plural = noun - lastletter;
      plural = plural + "ies" 
   }
   else
   {
      // case b!
      plural = noun + "s" 
   }
}
else 
{
    // noun is not case not a or b, so test for c, d.
}
output plural;

<div class="open_grepper_editor" title="Edit & Save To Grepper"></div>

Learn ReactJs, React Native from akashmittal.com