Advertisement
homer512

Dominic's question

May 21st, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <array>
  2. #include <iostream>
  3.  
  4.  
  5. int main()
  6. {
  7.   std::array<std::array < char, 3>, 3> table = { {
  8.     { '-','-','-', },
  9.     { '-','-','-', },
  10.     { '-','-','-', },
  11.     } };
  12.  
  13.   for(int firstCounter = 0; firstCounter < table.size(); firstCounter++) {
  14.     for(int secondCounter = 0; secondCounter < table[firstCounter].size();
  15.         secondCounter++) {
  16.       std::cout << table[firstCounter][secondCounter];
  17.     }
  18.     std::cout << std::endl;
  19.   }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement