fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4. int N = 10;
  5. for (int i = 1; i <= N; i++){
  6. for(int j = 1; j <= N; j++){
  7. if (i == 1 || i == N || j == 1 || j == N) {
  8. cout << "*";
  9. } else cout << ".";
  10. } cout << endl;
  11. }
  12. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
**********
*........*
*........*
*........*
*........*
*........*
*........*
*........*
*........*
**********