Write a function named join_words() that does not take any input parameter. It repeatedly asks the user to enter words until they enter a period ("."). Your function should then print all of the words they entered (including the period) on a single line separated by spaces. This function does not return any output. Call the function to test the output. For example, calling join_words() does the following. Enter some words (. to stop): > hello > world > . hello world

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 22PE
icon
Related questions
Question

Write a function named join_words() that does not take any input parameter. It repeatedly asks the user to enter words until they enter a period ("."). Your function should then print all of the words they entered (including the period) on a single line separated by spaces. This function does not return any output. Call the function to test the output. For example, calling join_words() does the following. Enter some words (. to stop): > hello > world > . hello world

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning