Assignment 7 Due Thursday, October 20 at 3:20pm Assignment 7.1: What's Your Dragon Name (10pts)
The first two letters of your last name + last two letters of your first name + the first two letters of your mother's name + the last letter of your father's name
string firstName; //declare a string variable for the last name called lastName string motherName; //declare a string variable for the father's name called fatherName string dragonName;
cout << "Want to learn your \"dragon name?\"\n";
Please enter your first and last name:
Please enter your mother's first name:
Please enter your father's first name:
dragonName = lastName.substr(0, 2) + firstName.substr(firstName.length()-2, 2) + motherName.substr(???, ???) + fatherName.substr(???, ???);
Your "dragon name" is: "<dragon name>"
The output of your program should look like this (except user input will vary): Want to learn your "dragon name?" Please enter your first and last name: Jennifer Parrish Please enter your mother's first name: Cassandra Please enter your father's first name: Stewart Your "dragon name" is: "PaerCat"
Alternately: Assignment 7.3: The Longest Word (10 pts)
The length of pseudopseudohypoparathyroidism is <number of letters> letters.
cout << longest_word.substr(20,7) << endl; //should print the word thyroid to the console
|