Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need a algorithm for this please programming c Intro to Programming in C Programming Assignment 3 Assignment purpose: User defined functions, arrays, c- style

i need a algorithm for this please
programming c image text in transcribed
Intro to Programming in C Programming Assignment 3 Assignment purpose: User defined functions, arrays, c- style strings, file output Your assignment is to write program that scans words from the keyboard and makes them plural and saves both the original form of the word and the plural form in an output file called pluralWords.txt Rules l. If the word ends in 'y', remove the "y, and add "ies" to the end. Examples: cherry becomes cherries 2. Ifthe word ends with the letters 's, "ch", orsh" then simply add the letters .-es" to the end Examples: bus becomes buses, church becomes churches 3. If the above rules above do not apply then just add the letter's' to the end of the word. Examples: Mushroom becomes mushrooms Your program will ask the user if they want to enter a word, then read the word from the keyboard You may use scanf.%s". word); //word is a character array of size 20 After reading each word your program will create either an all upper or all lower version of the word and make a copy of that word e Next your program will create the plural form of the word and display it on the screen .Next your program will save the original input word (that is all uppercase or all lowercase), to a file and also save the plural form in the same file Your program will repeatedly read in words in English and output singular and plural words to the file until the user decides to quit (by entering n) You may assume that all input will be typed in alphabetic characters and that no punctuation or numeric characters will be used. You don't need to check this you can simply assume that the input will only contain the letters A through Z and no white space in the words. You do NOT need to verify whether or not the user entered a real word or a "nonsense" word Your program must have a minimum of 8 user defined functions (you may use additional functions) o o o o A function that greets the user A function that gets the word from the user A function that changes the word to all uppercase or all lowercase letters A function that determines which rule applies to the word. A function for each rule that converts a single word (3 functions) A function that saves both words to the output file o

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions