Skip to content

Instantly share code, notes, and snippets.

@oskimura
Created December 13, 2017 09:49
Show Gist options
  • Save oskimura/2448c1f5339d6bb1156fa3b4c0153776 to your computer and use it in GitHub Desktop.
Save oskimura/2448c1f5339d6bb1156fa3b4c0153776 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <cmath>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <numeric>
int main()
{
int w,h;
while (std::cin >> w >> h) {
if (w==0) {
continue;
}
for (int x=0;x<w;x++) {
for (int y=0;y<h;y++) {
if (y==0||y==h-1||x==0||x==w-1) {
std::cout << "#";
}
else {
std::cout << ".";
}
}
std::cout << std::endl;
}
std::cout << std::endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment