#include <iostream>
#include <vector>
#include <string>
#include <iomanip> // For formatting output
struct Book {
std:: string title;
std:: string author;
std:: string isbn;
} ;
int main( ) {
// Sample book data (you can replace this with user input or reading from a file)
std:: vector < Book> books = {
{ "The Lord of the Rings" , "J.R.R. Tolkien" , "978-0618260264" } ,
{ "Pride and Prejudice" , "Jane Austen" , "978-0141439518" } ,
{ "1984" , "George Orwell" , "978-0451524935" }
} ;
// Print header row
std:: cout << std:: setw ( 30 ) << "Title"
<< std:: setw ( 25 ) << "Author"
<< std:: setw ( 15 ) << "ISBN" << std:: endl ;
std:: cout << std:: string ( 70 , '-' ) << std:: endl ; // Separator line
// Print book data in rows
for ( const auto & book : books) {
std:: cout << std:: setw ( 30 ) << book.title
<< std:: setw ( 25 ) << book.author
<< std:: setw ( 15 ) << book.isbn << std:: endl ;
}
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8aW9tYW5pcD4gLy8gRm9yIGZvcm1hdHRpbmcgb3V0cHV0CgpzdHJ1Y3QgQm9vayB7CiAgICBzdGQ6OnN0cmluZyB0aXRsZTsKICAgIHN0ZDo6c3RyaW5nIGF1dGhvcjsKICAgIHN0ZDo6c3RyaW5nIGlzYm47Cn07CgppbnQgbWFpbigpIHsKICAgIC8vIFNhbXBsZSBib29rIGRhdGEgKHlvdSBjYW4gcmVwbGFjZSB0aGlzIHdpdGggdXNlciBpbnB1dCBvciByZWFkaW5nIGZyb20gYSBmaWxlKQogICAgc3RkOjp2ZWN0b3I8Qm9vaz4gYm9va3MgPSB7CiAgICAgICAgeyJUaGUgTG9yZCBvZiB0aGUgUmluZ3MiLCAiSi5SLlIuIFRvbGtpZW4iLCAiOTc4LTA2MTgyNjAyNjQifSwKICAgICAgICB7IlByaWRlIGFuZCBQcmVqdWRpY2UiLCAiSmFuZSBBdXN0ZW4iLCAiOTc4LTAxNDE0Mzk1MTgifSwKICA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