subject

Write a program to translate any entered string into a variation of the word "Woof" Define 2 character arrays: char human[100], dog[100] Ask the user to enter a string into human. Use cin. getline(human, 100) function call to get the string from the user in main. Create a function 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 – remember that arrays can be modified inside of functions and setting the characters of dog will effectively change the array passed as that 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 "wf" and so on, longer words will have a ‘w’ as the first character and an ‘f’ as the last character and however many o’s to have an equivalent resulting length. Make sure your code can handle any word length up to maximum allowed by the character array. Maintain the case as entered by the user. If the user enters "Hello" this becomes "Wooof" From main–not from inside the translate() function–display the translated message

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:30
Is a string of code written to hurt others by damaging or destroying
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
Consider the following declarations (1, 2, 3, 5, 7)class bagtype{public: void set(string, double, double, double, double); void print() const; string getstyle() const; double getprice() const; void get(double, double, double, double); bagtype(); bagtype(string, double, double, double, double); private: string style: double l; double w; double h; double price; }; a.) write the definition of the number function set so that private members are set according to the parametersb.) write the definition of the member function print that prints the values of the data membersc.) write the definition of the default constructor of the class bagtype so that the private member variables are initialized to "", 0.0, 0.0, 0.0, 0.0, respectively d.) write a c++ statement that prints the value of the object newbag.e.) write a c++ statement that declares the object tempbag of type bagtype, and initialize the member variables of tempbag to "backpack", 15, 8, 20 and 49.99, respectively
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Afiling system in which an intermediary source of reference, such as a file card, must be consulted to locate specific files is called a(n) system. a. shelf filing b. direct filing c. indirect filing d. shingling
Answers: 1
You know the right answer?
Write a program to translate any entered string into a variation of the word "Woof" Define 2 charact...
Questions
question
Mathematics, 14.12.2019 03:31
question
Physics, 14.12.2019 03:31