Answer to Question #319848 in C++ for Jhexter

Question #319848

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


1
Expert's answer
2022-03-29T02:10:26-0400
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog