Run ID:73507

提交时间:2024-05-19 11:51:09

#include <iostream> #include <string> struct Book { int id; std::string title; int quantity; double price; }; int main() { int n; std::cin >> n; Book books[100]; for (int i = 0; i < n; ++i) { std::cin >> books[i].id >> books[i].title >> books[i].quantity >> books[i].price; } for (int i = 0; i < n; ++i) { std::cout << books[i].id << " " << books[i].title << books[i].quantity << " " << books[i].price << "\n"; } return 0; }