#include <iostream> #include <string> #include <iomanip> using namespace std; int main() { //Variable definition int age, gradYear; double gpa; string name, birthCity, cMajor, cMinor, finState; //Data input cout << "Let's gather some data about you: " << endl; cout << "Enter your name: "; getline (cin,name); cout << "Enter your city of birth: "; getline (cin,birthCity); cout << "Enter your age: "; cin >> age; cout << "Enter your College major: "; getline (cin,cMajor); cin.ignore (255, '\n'); cout << "Enter your College minor: "; getline (cin,cMinor); cout << "Enter your GPA: "; cin >> gpa; cout << "Enter your Graduation year: "; cin >> gradYear; cin.ignore (255, '\n'); cout << "Enter the state you wish to live in after Graduation: "; getline (cin,finState); cout << endl; //Narrative based off data cout << "Here's a little bit about yourself: " << endl; cout << "Once upon a time " << name << " was born in " << birthCity << " " << age << " years ago. Presently, they are in college trying to major in " << cMajor << " with a minor in " << cMinor << ". Hopefully they will maintain their " << gpa << " GPA until they graduate in " << gradYear << " and then move to " << finState << " and live happily ever after. The end." << endl; return 0; } |