logo

UTK Notes


Lab 02: Penname

Assignment

You will be developing a program that allows an author to create a penname. You will need to ask the user for their first name and middle name. Then, you will ask them for their age, street number, street name, street type (e.g., lane, boulevard), and the city they were born in.

The author’s new first name will be their city of birth. The actor’s new last name will be their current street name.

The author’s new age will be the remainder after dividing the street number by their age. That quantity is then multiplied by 3.

The author’s new numeric address will be the author’s current age multiplied by 425, then divided (using integer division) by their current street number.

Finally, the author’s new street name will be their current last name. The street type will remain unchanged.

Sample output

1
2
3
4
5
6
7
8
Enter your first and middle names: Johnathan Student
Enter your age: 31
Enter your street number, name, and type: 222 Johnson Lane
Enter your city of birth: Birmingham

Your penname name is Birmingham Johnson.
You will write as a 15 year old.
Your address is 59 Student Lane.

Plagiarism

Please remember that labs are an individual effort. Please review the plagiarism policy on the course syllabus.

Submission

Submit your lab2.cpp file.

WARNING: If your .cpp file does not compile, it will NOT be graded, and you will receive a 0 for the lab, without regard to any partial credit. PLEASE ensure your file compiles before submitting!