Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

string Str1, Str2; char Char1, Char2; cout Enter several words separated by spacesin; cout Use getline to read entire line into Stri: ; aaa cout

image text in transcribed
image text in transcribed
image text in transcribed
string Str1, Str2; char Char1, Char2; cout "Enter several words separated by spacesin"; cout "Use getline to read entire line into Stri: "; aaa cout "Display the value of Striln"; cout "Str1 is " Stri "ln"; cout "Enter a single word, read it into Striln"; cout bbb cout "Display the value of Striln"; cout "Str1 is " Str 1"ln "; cout "Enter your first name, then read the first 2 in"; cout " characters into Char1 and then Char2ln"; cout ccc" using just one statement:"; cout "Display the values of Char1 and Char2In"; cout " separated by a spaceln"; cout "Char1 and Char2 are " ddd cout "Read in the next character into Char1ln"; eee cout "Char1 is " Char1 "ln" "; string Str1, Str2; char Char1, Char2, Char3; cout "Enter several words separated by spaces: "; II Use getline to read the entire line into Stri aaa II Display the value of Strl as shown in the example bbb cout "InEnter a single wordin"; ccc II Display the value of Str2 as shown in the example ddd cout "InEnter your first name: "; II Read the first character into Char1 and then the second into Char2 eee II Display the values of Char1 and Char2 as shown in the example fff II Read in the third character into Char3 ggg II Display the value of Char3 as shown in the example hhh - Replace aaa - hhh with the statement that performs the action as described in the preceding comments - Click on Run. The program should compile successfully - Take a screenshot that shows the Result pane showing the output WARNING: IF YOU USE THE SAME VALUES AS BELOW YOU GET A ZERO Although your keyboard input may be different, the Result pane should show Ny name is John Doe The date is 102322221:27 Enter several words separated by spaces: I am Groot Str1 is I am Groot Enter a single word: Hello str2 is Hello Enter your first name: John Char1 and Char2 are 30 char 3 is h

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 Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions