Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#include #include #include #include using namespace std; int main() { string fullname (John William Jones); cout < < fullname; string firstname, lastname, middlename; /* Part
#include#include #include #include using namespace std; int main() { string fullname ("John William Jones"); cout << fullname; string firstname, lastname, middlename; /* Part 1. Using the string functions separate the first middle and last name from the fullname variable into the variables firstname, middlename and lastname. Print the first middle and last names on separate lines*/ string string1 ( "This is a string of characters for the optional quiz"); string string2; /* Part 2. Using the string functions remove all the blanks in string1 and and save the compressed string into a variable string2 and print the string2 on a new line. */ cout << " Optional Quiz" << endl; return 0; }
Please complete in a way it can be copied and pasted to c++ codeblocks and show an image of the program being ran please
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started