Writea c++program that would ask the user to enter their personal information: last name,first name, middle name, birthday, age, gender and permanent address
#include <iostream>
using namespace std;
int main()
{
char lastName;
char firstName;
char middleName;
char birthday;
char gender;
char address;
int age;
cout << "Enter your personal information: " << "\n";
cout << "Lastname: ";
cin >> lastName;
cout << "\nFirstName: ";
cin >> firstName;
cout << "\nMiddlename: ";
cin >> middleName;
cout << "\nBirthday: ";
cin >> birthday;
cout << "\nAge: ";
cin >> age;
cout << "\nGender: ";
cin >> gender;
cout << "\nPermanent address: ";
cin >> address;
cout << "Your personal information: << "\n\n";
cout << "Lastname: " << lastName;
cout << "\nFirstName: " << firstName;
cout << "\nMiddlename: " << middleName;
cout << "\nBirthday: " << birthday;
cout << "\nAge: " << age;
cout << "\nGender: " << gender;
cout << "\nPermanent address: " << address;
return 0;
}
Comments
Leave a comment