accept the noun and the output of plural c++
C++
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>
Also in C++:
- Title
- c++ delet from memory
- Category
- C++
- Title
- c++ program for addition of two numbers using functions
- Category
- C++
- Title
- preorder traversal
- Category
- C++
- Title
- using namespace std in c++
- Category
- C++
- Title
- floor() in c++
- Category
- C++
- Title
- cut by delimiter c++
- Category
- C++
- Title
- graph using djacency matrix c++
- Category
- C++
- Title
- c++ typedef
- Category
- C++
- Title
- runtime error in c++
- Category
- C++
- Title
- c++ vector iterator
- Category
- C++
- Title
- peak in c++
- Category
- C++
- Title
- stringstream in c++ with delimiter
- Category
- C++
- Title
- convert int to binary string c++
- Category
- C++
- Title
- simple timer arduino blynk library error
- Category
- C++
- Title
- c++ map find
- Category
- C++
- Title
- Combination Sum
- Category
- C++
- Title
- monotonic deque
- Category
- C++
- Title
- unordered_set c++
- Category
- C++
- Title
- initialize 3d vector c++
- Category
- C++
- Title
- Html tabulation
- Category
- C++
- Title
- maximum possible number atmost k swaps
- Category
- C++
- Title
- call by reference c++ example
- Category
- C++
- Title
- sum of two numbers c++
- Category
- C++
- Title
- c++ append to list
- Category
- C++
- Title
- decimal to hex cpp
- Category
- C++
- Title
- set c++
- Category
- C++
- Title
- basic ex of maps in c++
- Category
- C++
- Title
- cin.ignore
- Category
- C++
- Title
- c++ sort array of ints
- Category
- C++
- Title
- how to append one vector to another c++
- Category
- C++
- Title
- how to find hcf in c++
- Category
- C++
- Title
- bfs in C++
- Category
- C++
- Title
- c++ pi
- Category
- C++
- Title
- how to concatinate two strings in c++
- Category
- C++
- Title
- how to sort in descending order c++
- Category
- C++
- Title
- can you use a return to print a string when referencing an integer c++
- Category
- C++
- Title
- c++ char to string
- Category
- C++
- Title
- sum of integer in array c++
- Category
- C++
- Title
- how to get input from the console in c++
- Category
- C++
- Title
- C++ and endl
- Category
- C++
- Title
- change int to string cpp
- Category
- C++
- Title
- initialize int c++
- Category
- C++
- Title
- SFML window
- Category
- C++
- Title
- c++ how to skip the last element of vector
- Category
- C++
- Title
- random number generator c++
- Category
- C++
- Title
- how to make a switch case statement in c++
- Category
- C++
- Title
- fail() in c++
- Category
- C++
- Title
- Get handle in C++
- Category
- C++
- Title
- cpp create lambda with recursion
- Category
- C++
- Title
- command line options in c++
- Category
- C++
- Title
- find in string c++
- Category
- C++
- Title
- iterate through unordered_map c++ in reverse order
- Category
- C++
- Title
- list conda environments
- Category
- C++
- Title
- 2d vector
- Category
- C++
- Title
- min heap declaration in c++ stl
- Category
- C++
- Title
- c++ ambigous error
- Category
- C++
- Title
- least number of coins to form a sum
- Category
- C++
- Title
- chess perft 5
- Category
- C++
- Title
- file format not recognized treating as linker script c++
- Category
- C++
- Title
- max element in array c++ stl
- Category
- C++
- Title
- c++ compare char array
- Category
- C++
- Title
- lopping over an array c++
- Category
- C++
- Title
- cs1955 unity vector3
- Category
- C++
- Title
- how to make a 2d vector in c++
- Category
- C++
- Title
- remove item from layout
- Category
- C++
- Title
- binary search stl in c++
- Category
- C++
- Title
- c++ push multiple elements to vector
- Category
- C++
- Title
- count number of zeros in array in O(logN)
- Category
- C++
- Title
- how to get last element of set in c++
- Category
- C++
- Title
- c++ constructor
- Category
- C++
- Title
- how to round to nearest whole number unity
- Category
- C++
- Title
- c++ looping through a vector
- Category
- C++
- Title
- c++ char to int
- Category
- C++
- Title
- c++ rainbow text
- Category
- C++
- Title
- how to get the prime number in c++ where time complexity is 0(log n)
- Category
- C++
- Title
- c++ remove element from vector
- Category
- C++
- Title
- count a character in a string c++
- Category
- C++
- Title
- declaration vs. definition cpp
- Category
- C++
- Title
- Shortest Distance in a Maze
- Category
- C++
- Title
- time conversion hackerrank solution in c++
- Category
- C++
- Title
- c++ throw exception
- Category
- C++
- Title
- arduino falling edge
- Category
- C++
- Title
- c++ return multiple values
- Category
- C++
- Title
- array<string, 7> c++
- Category
- C++
- Title
- Insert into vector C++
- Category
- C++
- Title
- number of islands leetcode code
- Category
- C++
- Title
- log base 10 c+_+
- Category
- C++
- Title
- c++ get length of array
- Category
- C++
- Title
- setbits
- Category
- C++
- Title
- mao two drivers c++
- Category
- C++
- Title
- How to find the suarray with maximum sum using divide and conquer
- Category
- C++
- Title
- c++ stream string into fiel
- Category
- C++
- Title
- shortest path with bfs in c++
- Category
- C++
- Title
- find in vector in c++
- Category
- C++
- Title
- Temporary file using MSFT API in cpp
- Category
- C++
- Title
- comparing strings c++
- Category
- C++
- Title
- int to float c++
- Category
- C++
- Title
- namespaces c++
- Category
- C++
- Title
- typeid to string c++
- Category
- C++
- Title
- c++ public inheritance not getting protected
- Category
- C++