Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

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

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

Deductive And Object Oriented Databases Second International Conference Dood 91 Munich Germany December 18 1991 Proceedings Lncs 566

Authors: Claude Delobel ,Michael Kifer ,Yoshifumi Masunaga

1st Edition

3540550151, 978-3540550150

More Books

Students also viewed these Databases questions