Advertisement
avr39-ripe

scr array render

Feb 27th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include "pch.h"
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.         const int hRes = 9;
  9.         const int scrSize = hRes*hRes;
  10.         char scr[scrSize];
  11.         for (int i=0; i < scrSize; scr[i++]='#');
  12.         for (int i=0; i < scrSize; i++){cout<<" "<<scr[i]<<(!((i+1)%hRes) ? " \n" : " ");}
  13.         cout << '\n';
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement