Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- string prompt("Wie lautet Ihr Name: "),
- name,
- linie( 40, '-'),
- gesamt = "Hallo ";
- cout << prompt;
- getline( cin, name);
- gesamt = gesamt + name;
- cout << linie << endl << gesamt << endl;
- cout << "Ihr Name ist " << name.length() << " Zeichen lang!" << endl;
- cout << linie << endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment