fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int buff[30][30];
  6.  
  7. for(int i=0;i<30;i++){
  8. for(int j=0;j<30;j++){
  9. int k = i - 11; //центр по x
  10. int m = j- 11; //центр по y
  11. if(k*k+m*m<=8*8)
  12. {
  13. buff[i][j]=1;
  14. cout<<"+";
  15. }else{
  16. cout<<"0";
  17. }
  18.  
  19. }
  20. cout<<endl;
  21.  
  22. }
  23. return 0;
  24. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
000000000000000000000000000000
000000000000000000000000000000
000000000000000000000000000000
00000000000+000000000000000000
00000000+++++++000000000000000
000000+++++++++++0000000000000
00000+++++++++++++000000000000
00000+++++++++++++000000000000
0000+++++++++++++++00000000000
0000+++++++++++++++00000000000
0000+++++++++++++++00000000000
000+++++++++++++++++0000000000
0000+++++++++++++++00000000000
0000+++++++++++++++00000000000
0000+++++++++++++++00000000000
00000+++++++++++++000000000000
00000+++++++++++++000000000000
000000+++++++++++0000000000000
00000000+++++++000000000000000
00000000000+000000000000000000
000000000000000000000000000000
000000000000000000000000000000
000000000000000000000000000000
000000000000000000000000000000
000000000000000000000000000000
000000000000000000000000000000
000000000000000000000000000000
000000000000000000000000000000
000000000000000000000000000000
000000000000000000000000000000