Write a program that collecs student's biodata (surname, other names, date of birth,town,LGA, state, country, height)and display a report on what was inputted.
#include <iostream>
using namespace std;
string name, surname, town, lga, state, country;
int date;
double height;
int main()
{
cout << "Name: ";
cin >> name;
cout << "Surname: ";
cin >> surname;
cout << "Date of birth: ";
cin >> date;
cout << "Town: ";
cin >> town;
cout << "LGA: ";
cin >> lga;
cout << "State: ";
cin >> state;
cout << "Country: ";
cin >> country;
cout << "Height: ";
cin >> height;
cout << '\n';
cout << "Name: " << name << '\n'
<< "Surname: " << surname << '\n'
<< "Date of birth: " << date << '\n'
<< "Town: " << town << '\n'
<< "LGA: " << lga << '\n'
<< "State: " << state << '\n'
<< "Country: " << country << '\n'
<< "Height: " << height << '\n';
}
Example:
Name: Azimjon
Surname: Fayzulloev
Date of birth: 7
Town: Gulakandoz
LGA: Rasulov
State: Soghd
Country: Tajikistan
Height: 1.7
Name: Azimjon
Surname: Fayzulloev
Date of birth: 7
Town: Gulakandoz
LGA: Rasulov
State: Soghd
Country: Tajikistan
Height: 1.7
Comments
Leave a comment