C++ programming

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section13.1: Single Structures
Problem 4E
icon
Related questions
Question

C++ programming

Write a sequence of input statements to read a user's first, middle, and last name and then print a monogram. For
instance, if the user enters Franklin Delano Roosevelt, then the program prints FDR.
monogram.cpp
1
#include <iostream>
2 #include <string>
3 using namespace std;
4
int main()
{
cout « "Enter your first, middle, and last name:
string first;
string middle;
string last;
9.
10
11
12
13
cout . . .;
14
15
return 0;
}
16
Transcribed Image Text:Write a sequence of input statements to read a user's first, middle, and last name and then print a monogram. For instance, if the user enters Franklin Delano Roosevelt, then the program prints FDR. monogram.cpp 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 int main() { cout « "Enter your first, middle, and last name: string first; string middle; string last; 9. 10 11 12 13 cout . . .; 14 15 return 0; } 16
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
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