Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
568 B
0
Indexable
Never
#include <iostream>
#include <vector>
#include <algorithm>


int main()
{
	int X, Y,X1,Y1,X2,Y2;
	std::cin >> X >> Y >> X1 >> Y1 >> X2 >> Y2;
	for (int y = 0; y < Y; y++) {
		for (int x = 0; x < X; x++) {
			if (y == 0 || y == Y - 1) {
				std::cout << "#";
			}
			else if (x == 0 || x == X - 1) {
				std::cout << "#";
			}
			else if (x == X1 - 1 && y == Y1 - 1) {
				std::cout << "$";
			}
			else if (x == X2 - 1 && y == Y2 - 1) {
				std::cout << "*";
			}
			else {
				std::cout << ".";
			}
			
		}
		std::cout << "\n";
	}


}
Leave a Comment