#include using namespace std; int main () { void printInformation(string, int, float, char, bool); string name; bool inState; int age; float gpa; char gender; char answer; cout << "What is your name: "; cin >> name; cout << "What is your age: "; cin >> age; cout << "What is your GPA: "; cin >> gpa; cout << "Are you male or female (M/F): "; cin >> gender; cout << "Do you live in the state of Ohio (y/n): "; cin >> answer; inState = (answer == 'y'); printInformation(name, age, gpa, gender, inState); return 0; } void printInformation(string name, int age, float gpa, char gender, bool inState) { cout << "Student Information: " << endl; cout << "\tName: " << name << endl; cout << "\tAge: " << age << endl; cout << "\tGPA: " << gpa << endl; cout << "\tGender: " << ((gender == 'M') ? "Male" : "Female") << endl; cout << "\tResident: " << ((inState) ? "Yes" : "No") << endl; }