Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <cmath>
- #include <math.h>
- using namespace std;
- int n;
- int m;
- int main()
- {
- cin >> n >> m;
- int k = n;
- while (true){
- for (int j = 1; j <= m; j++){
- cout << "#";
- }
- k = k - 1;
- if (k > 0){
- }
- else{
- cout << endl;
- return 0;
- }
- cout << endl;
- for (int j = 1; j <= m - 1; j++){
- cout << ".";
- }
- cout << "#";
- k = k - 1;
- if (k > 0){
- }
- else{
- cout << endl;
- return 0;
- }
- cout << endl;
- for (int j = 1; j <= m; j++){
- cout << "#";
- }
- k = k - 1;
- if (k > 0){
- }
- else{
- cout << endl;
- return 0;
- }
- cout << endl;
- cout << "#";
- for (int j = 1; j <= m - 1; j++){
- cout << ".";
- }
- k = k - 1;
- if (k > 0){
- }
- else{
- cout << endl;
- return 0;
- }
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement