Advertisement
Ilya_konstantinov

Untitled

Jan 12th, 2025
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | Source Code | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <algorithm>
  4. #include <vector>
  5.  
  6. struct Book {
  7.   int page_count;
  8.   std::string name, color;
  9. };
  10.  
  11. #include "func.h"
  12.  
  13. int main(){
  14.   int n; cin >> n;
  15.   std::vector<Book> shelf(n);
  16.   for (int i = 0; i < n; ++i) {
  17.     std::cin >> shelf[i].name >> shelf[i].color >> shelf[i].page_count;
  18.   }
  19.   inventory(shelf);
  20.   for (int i = 0; i < shelf.size(); ++i) {
  21.     std::cout << shelf[i].name << '\n';
  22.   }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement