#include <iostream>
#include <string>
using namespace std;
struct book
{
string title;
string author;
unsigned int year;
};
int main()
{
book bookrec;
cout << “Enter Book Title:”; getline(cin,bookrec.title);
cout << “Enter Book Author:”; getline(cin,bookrec.author);
cout << “Enter Publication Year:”; cin >> bookrec.year;
cout << “The following information has been received…\n”);
cout << “Book Title:” << bookrec.title;
cout << “Book Author:” << bookrec.author;
cout << “Year Published:” << bookrec.year << “\n”;
system(“pause”);
return 0;
}
#include <iostream>
#include <string>
using namespace std;
struct book {
string title;
string author;
unsigned int year;
};
int main() {
book bookrec;
cout << "Enter Book Title:"; getline(cin,bookrec.title);
cout << "Enter Book Author:"; getline(cin,bookrec.author);
cout << "Enter Publication Year:"; cin >> bookrec.year;
cout << "The following information has been received…\n";
cout << "Book Title:" << bookrec.title;
cout << "Book Author:" << bookrec.author;
cout << "Year Published:" << bookrec.year << "\n";
system("pause");
return 0;
}
Comments
Leave a comment