Homework7-1 - Homework #7 /* * Program hw7_1 * Written by...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework #7 /* * Program hw7_1 * Written by Justin Waters * Inputs: user enters a noun * Outputs: Plural form of entered noun * Description: The program asks user to enter a noun then returns the original noun and it's plural form based on certain rules * */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> //prototypes void explain (void); //function to tell user about the program int pluralizer(char noun[30]); //function to convert the noun int main (void) { char noun[30]; int replay; explain(); //function to tell user about the program do{ printf("\n\nEnter a noun.\n"); //gets users noun fflush(stdin); scanf("%s",noun); //stores users noun pluralizer(noun); //sends users noun to conversion function printf("Do you have another noun to try?\n\nPress '1' to enter a new noun or '0' to quit.\n"); scanf("%d", &replay); }while(replay == 1); printf("\n\nThanks for using my program.\n\n");
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
return (0); } //function that tells user about the program void explain (void)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Homework7-1 - Homework #7 /* * Program hw7_1 * Written by...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online