fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int m, n, k; //m-строки, n - столбцы
  6. cin >> m >> n >> k;
  7. for (int i = 0; i < m; i++){
  8. for (int j = 0; j < n; j++){
  9. if (i%6 == 0) cout << '+';
  10. else if (j%(k+1) == 0) cout << '+';
  11. else cout << '.';
  12. }
  13. cout << endl;
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0s 3416KB
stdin
126 101 49
stdout
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+
+.................................................+.................................................+