Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description The purpose of this challenge is to manually manipulate character arrays. This challenge translates human to dog. Requirements Write a program to translate any

Description

The purpose of this challenge is to manually manipulate character arrays. This challenge translates human to dog.

Requirements

Write a program to translate any entered string into a variation of the word Woof

Ask the user to enter a string use a character array to receive this input. Set your array to hold a string to hold up to 100 characters.

Create a function bool void translate(char human[], char dog[]). The function will take in text via the human parameter and pass the translated text via the dog parameter. Think of the human parameter as the input and the dog parameter as the output

Translate any one-character word as w

Two-character word as wf

Three-character words become wof

Four-character words become woof

6-character words become woooof

and so on, longer words will have a w as the first character and an f as the last character and however many os to have an equivalent resulting length

Maintain the case as entered by the user. If the user enters Hello this becomes Wooof

Maintain any other characters entered by the user. If the user enters Hello, Charlie! this becomes Wooof, Wooooof!

Ask the user to enter a string. Use cin.getline(char_variable, 100) function call to get the string from the user in main.

Display the translated message

Sample Interaction / Output

Enter a string: Hello Wooof Enter a string: How are you today? Wof wof wof wooof? 

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

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions

Question

Where those not participating, encouraged to participate?

Answered: 1 week ago

Question

Were all members comfortable brainstorming in front of each other?

Answered: 1 week ago

Question

4. What will the team agreement contain?

Answered: 1 week ago