Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Implementation In main, declare three char variables: a, b, and c, just in case the user wants a three- character acronym. We will learn much
Implementation In main, declare three char variables: a, b, and c, just in case the user wants a three- character acronym. We will learn much better ways of creating a collection of related variables later in the semester. Prompt the user to enter the size of the acronym. A valid acronym size falls within the range [2, 3]. If the user enters an integer other than 2 or 3, reprompt the user until either value is entered. This value will determine which version of buildAcronym will be called: the version that builds to a two-character acronym (e.g. S.V.) or the version that builds a three- character acronym (e.g. S.G.V.). Once program control returns to main, print out the acronym in the format specified in the "Results" section. You *cannot* print these acronyms in buildAcronym. You must only use char parameters in your buildAcronym definitions. You must not use any string parameters. The only pre-defined functions you may call are srand, rand, and time. Results You will add periods ("") to the end of each character value. Your output will look like this: Acronym: (CHAR VARIABLE 1].[CHAR VARIABLE 2]. [CHAR VARIABLE 3). Ex.: Acronym: S.G.V
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started