for (j = 1; j < = columns; j++)0for (j = 1; j < = columns; j++)4 for (j = 1; j < = columns; j++)5
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)4 ******************** * * * * * * * * ********************0
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************3******************** * * * * * * * * ********************4 ******************** * * * * * * * * ********************5
******************** * * * * * * * * ********************6******************** * * * * * * * * ********************7
________7______6******************** * * * * * * * * ********************9******** * * * * * * * * * * * * ********0******** * * * * * * * * * * * * ********1
******************** * * * * * * * * ********************3******** * * * * * * * * * * * * ********3
******************** * * * * * * * * ********************6******************** * * * * * * * * ********************9******** * * * * * * * * * * * * ********6******** * * * * * * * * * * * * ********7
for (j = 1; j < = columns; j++)8******** * * * * * * * * * * * * ********9
for (j = 1; j < = columns; j++)8 if i == 1 or i == N or j == 1 or j == N1
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********9
******** * * * * * * * * * * * * ********_9
if i == 1 or i == N or j == 1 or j == N5
for (i = 1; i < = rows; i++)5 if i == 1 or i == N or j == 1 or j == N7
for (i = 1; i < = rows; i++)_9
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)5 ******** ** ** * * * * * ** * * ** * * * * * ** ** ********1
for (j = 1; j < = columns; j++)0******** ** ** * * * * * ** * * ** * * * * * ** ** ********3
for (j = 1; j < = columns; j++)0******** ** ** * * * * * ** * * ** * * * * * ** ** ********5 ******** ** ** * * * * * ** * * ** * * * * * ** ** ********6
******** * * * * * * * * * * * * ********_9
******** ** ** * * * * * ** * * ** * * * * * ** ** ********8
******** ** ** * * * * * ** * * ** * * * * * ** ** ********_9
C
// C++ code for hollow rectangle0
// C++ code for hollow rectangle_1
for (i = 1; i < = rows; i++)_2
for (i = 1; i < = rows; i++)3 for (i = 1; i < = rows; i++)4for (i = 1; i < = rows; i++)5 for (i = 1; i < = rows; i++)6for (i = 1; i < = rows; i++)5 for (i = 1; i < = rows; i++)8
for (i = 1; i < = rows; i++)_9
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)5 for (j = 1; j < = columns; j++)2
for (j = 1; j < = columns; j++)0for (j = 1; j < = columns; j++)4 for (j = 1; j < = columns; j++)5
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)4 ******************** * * * * * * * * ********************0
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************3******************** * * * * * * * * ********************4 using5
******************** * * * * * * * * ********************6using7using8******** * * * * * * * * * * * * ********0for (i = 1; i < = rows; i++)00
******************** * * * * * * * * ********************3******** * * * * * * * * * * * * ********3
******************** * * * * * * * * ********************6using7________868______8******** * * * * * * * * * * * * ********6for (i = 1; i < = rows; i++)00
for (j = 1; j < = columns; j++)8******** * * * * * * * * * * * * ********9
for (j = 1; j < = columns; j++)8using7________868______8for (i = 1; i < = rows; i++)13for (i = 1; i < = rows; i++)14
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********9
******** * * * * * * * * * * * * ********_9
for (i = 1; i < = rows; i++)_18
for (i = 1; i < = rows; i++)5 if i == 1 or i == N or j == 1 or j == N7
for (i = 1; i < = rows; i++)_9
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)5 ******** ** ** * * * * * ** * * ** * * * * * ** ** ********1
for (j = 1; j < = columns; j++)0******** ** ** * * * * * ** * * ** * * * * * ** ** ********3
for (j = 1; j < = columns; j++)0******** ** ** * * * * * ** * * ** * * * * * ** ** ********5 ******** ** ** * * * * * ** * * ** * * * * * ** ** ********6
******** * * * * * * * * * * * * ********_9
Jawa
for (i = 1; i < = rows; i++)_31
for (i = 1; i < = rows; i++)_32 for (i = 1; i < = rows; i++)33
for (i = 1; i < = rows; i++)_34 for (i = 1; i < = rows; i++)35
for (j = 1; j < = columns; j++)0
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)2
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)40 for (i = 1; i < = rows; i++)3 for (i = 1; i < = rows; i++)4for (i = 1; i < = rows; i++)5 for (i = 1; i < = rows; i++)6for (i = 1; i < = rows; i++)5 for (i = 1; i < = rows; i++)8
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)5 for (j = 1; j < = columns; j++)2
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)4 for (i = 1; i < = rows; i++)54for (i = 1; i < = rows; i++)55for (i = 1; i < = rows; i++)56
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************3for (j = 1; j < = columns; j++)4 for (i = 1; i < = rows; i++)61for (i = 1; i < = rows; i++)55for (i = 1; i < = rows; i++)63
******************** * * * * * * * * ********************3for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************6******************** * * * * * * * * ********************4 for (i = 1; i < = rows; i++)68for (i = 1; i < = rows; i++)55 for (i = 1; i < = rows; i++)70
for (i = 1; i < = rows; i++)_71for (i = 1; i < = rows; i++)72for (i = 1; i < = rows; i++)55 for (i = 1; i < = rows; i++)74
for (i = 1; i < = rows; i++)_71for (i = 1; i < = rows; i++)76******** * * * * * * * * * * * * ********0for (i = 1; i < = rows; i++)00
******************** * * * * * * * * ********************6******** * * * * * * * * * * * * ********3
for (i = 1; i < = rows; i++)_71for (i = 1; i < = rows; i++)76******** * * * * * * * * * * * * ********6for (i = 1; i < = rows; i++)00
******************** * * * * * * * * ********************3******** * * * * * * * * * * * * ********9
******************** * * * * * * * * ********************3for (i = 1; i < = rows; i++)88
for (j = 1; j < = columns; j++)8******** * * * * * * * * * * * * ********9
for (i = 1; i < = rows; i++)_91
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********9
for (i = 1; i < = rows; i++)_91
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)18
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)98 for (i = 1; i < = rows; i++)40 for (i = 1; i < = rows; i++)3 for (j = 1; j < = columns; j++)01
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)5 for (j = 1; j < = columns; j++)06for (j = 1; j < = columns; j++)07for (j = 1; j < = columns; j++)08for (j = 1; j < = columns; j++)09******** * * * * * * * * * * * * ********7
for (j = 1; j < = columns; j++)8******** ** ** * * * * * ** * * ** * * * * * ** ** ********3
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********9
******** * * * * * * * * * * * * ********_9
for (j = 1; j < = columns; j++)_16
Python3
for (j = 1; j < = columns; j++)_17
for (j = 1; j < = columns; j++)_18
for (j = 1; j < = columns; j++)19 for (j = 1; j < = columns; j++)20
for (j = 1; j < = columns; j++)0
for (j = 1; j < = columns; j++)0for (j = 1; j < = columns; j++)4 for (j = 1; j < = columns; j++)24for (j = 1; j < = columns; j++)25 for (j = 1; j < = columns; j++)26________868______8for (i = 1; i < = rows; i++)55for (j = 1; j < = columns; j++)29for (j = 1; j < = columns; j++)30for (i = 1; i < = rows; i++)55for (j = 1; j < = columns; j++)32
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)4 for (j = 1; j < = columns; j++)35for (j = 1; j < = columns; j++)25 for (j = 1; j < = columns; j++)26________868______8for (i = 1; i < = rows; i++)55for (j = 1; j < = columns; j++)40for (j = 1; j < = columns; j++)30for (i = 1; i < = rows; i++)55for (j = 1; j < = columns; j++)32
******************** * * * * * * * * ********************3******************** * * * * * * * * ********************4 for (j = 1; j < = columns; j++)46for (j = 1; j < = columns; j++)47for (j = 1; j < = columns; j++)47 for (i = 1; i < = rows; i++)55 for (j = 1; j < = columns; j++)50 for (j = 1; j < = columns; j++)24for (j = 1; j < = columns; j++)47________0______47 ________0______0_5_____4____5
________7______6for (j = 1; j < = columns; j++)35for (j = 1; j < = columns; j++)47for (j = 1; j < = columns; j++)47 for (i = 1; i < = rows; i++)55 for (j = 1; j < = columns; j++)50 for (j = 1; j < = columns; j++)35for (j = 1; j < = columns; j++)47for (j = 1; j < = columns; j++)47 ________0______65
******************** * * * * * * * * ********************6for (j = 1; j < = columns; j++)67using8******** * * * * * * * * * * * * ********0for (j = 1; j < = columns; j++)70for (j = 1; j < = columns; j++)47for (j = 1; j < = columns; j++)72
******************** * * * * * * * * ********************3******** * * * * * * * * * * * * ********3 for (j = 1; j < = columns; j++)75
________7______6for (j = 1; j < = columns; j++)67using8******** * * * * * * * * * * * * ********6for (j = 1; j < = columns; j++)70for (j = 1; j < = columns; j++)47for (j = 1; j < = columns; j++)72
for (j = 1; j < = columns; j++)_8
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)67for (j = 1; j < = columns; j++)86
for (j = 1; j < = columns; j++)_87
for (j = 1; j < = columns; j++)88for (j = 1; j < = columns; j++)47 for (j = 1; j < = columns; j++)07
for (j = 1; j < = columns; j++)_91for (j = 1; j < = columns; j++)47 for (j = 1; j < = columns; j++)09
for (j = 1; j < = columns; j++)_94
for (j = 1; j < = columns; j++)_95
C#
using for (j = 1; j < = columns; j++)97
for (i = 1; i < = rows; i++)_98 for (i = 1; i < = rows; i++)34 ******************** * * * * * * * * ********************00
for (i = 1; i < = rows; i++)_9
******************** * * * * * * * * ********************02for (i = 1; i < = rows; i++)2
******************** * * * * * * * * ********************02for (i = 1; i < = rows; i++)40 for (i = 1; i < = rows; i++)3 for (i = 1; i < = rows; i++)4for (i = 1; i < = rows; i++)5 for (i = 1; i < = rows; i++)6for (i = 1; i < = rows; i++)5 for (i = 1; i < = rows; i++)8
******************** * * * * * * * * ********************02for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)5 for (j = 1; j < = columns; j++)2
for (j = 1; j < = columns; j++)0for (j = 1; j < = columns; j++)4 for (j = 1; j < = columns; j++)5
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************22for (j = 1; j < = columns; j++)4 ******************** * * * * * * * * ********************0
******************** * * * * * * * * ********************22for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8******************** * * * * * * * * ********************4 ******************** * * * * * * * * ********************5
******************** * * * * * * * * ********************3******************** * * * * * * * * ********************31
******************** * * * * * * * * ********************32******************** * * * * * * * * ********************33******** * * * * * * * * * * * * ********0for (i = 1; i < = rows; i++)00
for (j = 1; j < = columns; j++)8******** * * * * * * * * * * * * ********3
******************** * * * * * * * * ********************32******************** * * * * * * * * ********************33******** * * * * * * * * * * * * ********6for (i = 1; i < = rows; i++)00
******************** * * * * * * * * ********************22******** * * * * * * * * * * * * ********9
******************** * * * * * * * * ********************22******************** * * * * * * * * ********************45
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********9
******************** * * * * * * * * ********************02******** * * * * * * * * * * * * ********9
******************** * * * * * * * * ********************02for (i = 1; i < = rows; i++)18
******************** * * * * * * * * ********************02for (i = 1; i < = rows; i++)98 for (i = 1; i < = rows; i++)40 for (i = 1; i < = rows; i++)3 ******************** * * * * * * * * ********************56
******************** * * * * * * * * ********************02for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)5 ******** ** ** * * * * * ** * * ** * * * * * ** ** ********1
for (j = 1; j < = columns; j++)0******** ** ** * * * * * ** * * ** * * * * * ** ** ********3
******************** * * * * * * * * ********************02******** * * * * * * * * * * * * ********9
******** * * * * * * * * * * * * ********_9
******************** * * * * * * * * ********************_67
PHP
******************** * * * * * * * * ********************_68
******************** * * * * * * * * ********************_69
for (i = 1; i < = rows; i++)_2
******************** * * * * * * * * ********************71 for (i = 1; i < = rows; i++)4******************** * * * * * * * * ********************73******************** * * * * * * * * ********************74******************** * * * * * * * * ********************75******************** * * * * * * * * ********************76
for (i = 1; i < = rows; i++)_9
for (j = 1; j < = columns; j++)0******************** * * * * * * * * ********************79******** * * * * * * * * * * * * ********7
for (j = 1; j < = columns; j++)0******************** * * * * * * * * ********************82******** * * * * * * * * * * * * ********7
for (j = 1; j < = columns; j++)0for (j = 1; j < = columns; j++)4 using8******************** * * * * * * * * ********************79 ________7______88******************** * * * * * * * * ********************79 ******************** * * * * * * * * ********************90******************** * * * * * * * * ********************73******** * * * * * * * * * * * * ********7________7______79________7______94
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)4 using8******************** * * * * * * * * ********************82 ******************** * * * * * * * * ********************88******************** * * * * * * * * ********************82 ******************** * * * * * * * * ********************90******************** * * * * * * * * ********************75******** * * * * * * * * * * * * ********7________7______82******************** * * * * * * * * ********************_94
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************3******************** * * * * * * * * ********************4 using8******************** * * * * * * * * ********************79 ******** * * * * * * * * * * * * ********14******************** * * * * * * * * ********************79 ******** * * * * * * * * * * * * ********16******************** * * * * * * * * ********************73 ******** * * * * * * * * * * * * ********18
________7______6******************** * * * * * * * * ********************82 ******** * * * * * * * * * * * * ********14******************** * * * * * * * * ********************82 ******** * * * * * * * * * * * * ********16******************** * * * * * * * * ********************75******** * * * * * * * * * * * * ********25
________7______6******** * * * * * * * * * * * * ********27________868______8******** * * * * * * * * * * * * ********0******** * * * * * * * * * * * * ********30
******************** * * * * * * * * ********************3******** * * * * * * * * * * * * ********3
******************** * * * * * * * * ********************6******** * * * * * * * * * * * * ********27________868______8******** * * * * * * * * * * * * ********6******** * * * * * * * * * * * * ********30
for (j = 1; j < = columns; j++)8******** * * * * * * * * * * * * ********9
for (j = 1; j < = columns; j++)8******** * * * * * * * * * * * * ********27________868______8for (i = 1; i < = rows; i++)13for (i = 1; i < = rows; i++)14
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********9
******** * * * * * * * * * * * * ********_9
for (j = 1; j < = columns; j++)0 if i == 1 or i == N or j == 1 or j == N5
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********51 ******** * * * * * * * * * * * * ********52
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********54 ******** * * * * * * * * * * * * ********55
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)4******** * * * * * * * * * * * * ********51******************** * * * * * * * * ********************74******** * * * * * * * * * * * * ********54for (i = 1; i < = rows; i++)14
******** * * * * * * * * * * * * ********_62
******** * * * * * * * * * * * * ********_63
Javascript
******** * * * * * * * * * * * * ********_64
******************** * * * * * * * * ********************22******** * * * * * * * * * * * * ********66
******************** * * * * * * * * ********************22for (i = 1; i < = rows; i++)2
******************** * * * * * * * * ********************22******************** * * * * * * * * ********************71 ******** * * * * * * * * * * * * ********71
******************** * * * * * * * * ********************22for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8******** * * * * * * * * * * * * ********75 for (j = 1; j < = columns; j++)2
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)4 for (j = 1; j < = columns; j++)5
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************32for (j = 1; j < = columns; j++)4 ******************** * * * * * * * * ********************0
******************** * * * * * * * * ********************32for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************3******************** * * * * * * * * ********************4 ******** * * * * * * * * * * * * ********89
******** * * * * * * * * * * * * ********90******** * * * * * * * * * * * * ********91******** * * * * * * * * * * * * ********0for (i = 1; i < = rows; i++)14
******************** * * * * * * * * ********************3******** * * * * * * * * * * * * ********3
******************** * * * * * * * * ********************6******** * * * * * * * * * * * * ********91******** * * * * * * * * * * * * ********98for (i = 1; i < = rows; i++)14
******************** * * * * * * * * ********************32******** * * * * * * * * * * * * ********9
******************** * * * * * * * * ********************32******** * * * * * * * * * * * * ********91 if i == 1 or i == N or j == 1 or j == N04for (i = 1; i < = rows; i++)14
for (j = 1; j < = columns; j++)8******** * * * * * * * * * * * * ********9
******************** * * * * * * * * ********************22******** * * * * * * * * * * * * ********9
******************** * * * * * * * * ********************22 if i == 1 or i == N or j == 1 or j == N5
******************** * * * * * * * * ********************22******** * * * * * * * * * * * * ********75 if i == 1 or i == N or j == 1 or j == N14
for (j = 1; j < = columns; j++)8 if i == 1 or i == N or j == 1 or j == N16
******************** * * * * * * * * ********************22******** ** ** * * * * * ** * * ** * * * * * ** ** ********3
******************** * * * * * * * * ********************_22
******************** * * * * * * * * ********************22 if i == 1 or i == N or j == 1 or j == N21
for (j = 1; j < = columns; j++)0 if i == 1 or i == N or j == 1 or j == N23
Keluaran.
Kompleksitas Waktu. O(m * n), di mana m dan n mewakili input yang diberikan
Ruang Bantu. O(1), tidak diperlukan ruang ekstra, jadi ini adalah konstanta
Pola bintang persegi berongga
******** * * * * * * * * * * * * ********
Penjelasan.
- Masukkan jumlah baris
- Untuk baris, loop luar dari 1 hingga N
- Untuk kolom, loop dalam dari 1 hingga N
- Di dalam lingkaran dalam, cetak bintang untuk baris pertama dan terakhir atau untuk kolom pertama dan terakhir. Yang merupakan bintang cetak
- jika tidak, ruang cetak
- Setelah mencetak semua kolom dalam satu baris, cetak baris kosong setelah putaran dalam.
Direkomendasikan. Harap coba pendekatan Anda pada {IDE} terlebih dahulu, sebelum melanjutkan ke solusi
C++
if i == 1 or i == N or j == 1 or j == N_24
#include <bits/stdc++.h>
using for (i = 1; i < = rows; i++)0 for (i = 1; i < = rows; i++)1
if i == 1 or i == N or j == 1 or j == N_29
for (i = 1; i < = rows; i++)3 if i == 1 or i == N or j == 1 or j == N31for (i = 1; i < = rows; i++)5 if i == 1 or i == N or j == 1 or j == N33
for (i = 1; i < = rows; i++)_9
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)5 for (j = 1; j < = columns; j++)2
for (j = 1; j < = columns; j++)0
for (j = 1; j < = columns; j++)0for (j = 1; j < = columns; j++)4 for (j = 1; j < = columns; j++)5
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)4 if i == 1 or i == N or j == 1 or j == N46
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************3******************** * * * * * * * * ********************4 if i == 1 or i == N or j == 1 or j == N51
******************** * * * * * * * * ********************6******************** * * * * * * * * ********************9******** * * * * * * * * * * * * ********0 if i == 1 or i == N or j == 1 or j == N55
******************** * * * * * * * * ********************3******** * * * * * * * * * * * * ********3
________7______6******************** * * * * * * * * ********************9******** * * * * * * * * * * * * ********6 if i == 1 or i == N or j == 1 or j == N55
for (j = 1; j < = columns; j++)8******** * * * * * * * * * * * * ********9
for (j = 1; j < = columns; j++)8******************** * * * * * * * * ********************9for (i = 1; i < = rows; i++)13******** * * * * * * * * * * * * ********7
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********9
******** * * * * * * * * * * * * ********_9
if i == 1 or i == N or j == 1 or j == N71
for (i = 1; i < = rows; i++)5 if i == 1 or i == N or j == 1 or j == N7
for (i = 1; i < = rows; i++)_9
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)5 if i == 1 or i == N or j == 1 or j == N77
for (j = 1; j < = columns; j++)0 if i == 1 or i == N or j == 1 or j == N79
for (j = 1; j < = columns; j++)0******** ** ** * * * * * ** * * ** * * * * * ** ** ********5 ******** ** ** * * * * * ** * * ** * * * * * ** ** ********6
******** * * * * * * * * * * * * ********_9
if i == 1 or i == N or j == 1 or j == N_84
C
if i == 1 or i == N or j == 1 or j == N_85
// C++ code for hollow rectangle_1
if i == 1 or i == N or j == 1 or j == N_29
for (i = 1; i < = rows; i++)3 if i == 1 or i == N or j == 1 or j == N31for (i = 1; i < = rows; i++)5 if i == 1 or i == N or j == 1 or j == N33
for (i = 1; i < = rows; i++)_9
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)5 for (j = 1; j < = columns; j++)2
for (j = 1; j < = columns; j++)0
for (j = 1; j < = columns; j++)0for (j = 1; j < = columns; j++)4 for (j = 1; j < = columns; j++)5
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)4 if i == 1 or i == N or j == 1 or j == N46
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************3******************** * * * * * * * * ********************4 ******** ** ** * * * * * ** * * ** * * * * * ** ** ********09
******************** * * * * * * * * ********************6using7using8******** * * * * * * * * * * * * ********0for (i = 1; i < = rows; i++)00
******************** * * * * * * * * ********************3******** * * * * * * * * * * * * ********3
******************** * * * * * * * * ********************6using7________868______8******** * * * * * * * * * * * * ********6for (i = 1; i < = rows; i++)00
for (j = 1; j < = columns; j++)8******** * * * * * * * * * * * * ********9
for (j = 1; j < = columns; j++)8using7________868______8for (i = 1; i < = rows; i++)13for (i = 1; i < = rows; i++)14
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********9
******** * * * * * * * * * * * * ********_9
if i == 1 or i == N or j == 1 or j == N71
for (i = 1; i < = rows; i++)5 if i == 1 or i == N or j == 1 or j == N7
for (i = 1; i < = rows; i++)_9
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)5 if i == 1 or i == N or j == 1 or j == N77
for (j = 1; j < = columns; j++)0 if i == 1 or i == N or j == 1 or j == N79
for (j = 1; j < = columns; j++)0******** ** ** * * * * * ** * * ** * * * * * ** ** ********5 ******** ** ** * * * * * ** * * ** * * * * * ** ** ********6
******** * * * * * * * * * * * * ********_9
Jawa
******** ** ** * * * * * ** * * ** * * * * * ** ** ********_45
for (i = 1; i < = rows; i++)_32 for (i = 1; i < = rows; i++)33
for (i = 1; i < = rows; i++)_34 for (i = 1; i < = rows; i++)35
for (j = 1; j < = columns; j++)0
for (j = 1; j < = columns; j++)0 if i == 1 or i == N or j == 1 or j == N29
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)40 for (i = 1; i < = rows; i++)3 if i == 1 or i == N or j == 1 or j == N31for (i = 1; i < = rows; i++)5 if i == 1 or i == N or j == 1 or j == N33
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)5 for (j = 1; j < = columns; j++)2
******** ** ** * * * * * ** * * ** * * * * * ** ** ********_64
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)4 for (i = 1; i < = rows; i++)54for (i = 1; i < = rows; i++)55for (i = 1; i < = rows; i++)56
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************3for (j = 1; j < = columns; j++)4 for (i = 1; i < = rows; i++)61for (i = 1; i < = rows; i++)55******** ** ** * * * * * ** * * ** * * * * * ** ** ********76
******************** * * * * * * * * ********************3for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************6******************** * * * * * * * * ********************4 for (i = 1; i < = rows; i++)68for (i = 1; i < = rows; i++)55 for (i = 1; i < = rows; i++)70
for (i = 1; i < = rows; i++)_71for (i = 1; i < = rows; i++)72for (i = 1; i < = rows; i++)55 ******** ** ** * * * * * ** * * ** * * * * * ** ** ********87
for (i = 1; i < = rows; i++)_71for (i = 1; i < = rows; i++)76******** * * * * * * * * * * * * ********0for (i = 1; i < = rows; i++)00
******************** * * * * * * * * ********************6******** * * * * * * * * * * * * ********3
for (i = 1; i < = rows; i++)_71for (i = 1; i < = rows; i++)76******** * * * * * * * * * * * * ********6for (i = 1; i < = rows; i++)00
******************** * * * * * * * * ********************3******** * * * * * * * * * * * * ********9
******************** * * * * * * * * ********************3for (i = 1; i < = rows; i++)88
for (j = 1; j < = columns; j++)8******** * * * * * * * * * * * * ********9
for (i = 1; i < = rows; i++)_91
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********9
for (i = 1; i < = rows; i++)_91
for (j = 1; j < = columns; j++)0 if i == 1 or i == N or j == 1 or j == N71
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)98 for (i = 1; i < = rows; i++)40 for (i = 1; i < = rows; i++)3 for (j = 1; j < = columns; j++)01
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)5 for (j = 1; j < = columns; j++)06// C++ code for hollow rectangle20******** * * * * * * * * * * * * ********7
for (j = 1; j < = columns; j++)8 if i == 1 or i == N or j == 1 or j == N79
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********9
******** * * * * * * * * * * * * ********_9
for (j = 1; j < = columns; j++)_16
Python3
// C++ code for hollow rectangle_28
// C++ code for hollow rectangle_29
for (j = 1; j < = columns; j++)19 // C++ code for hollow rectangle31
for (j = 1; j < = columns; j++)0
for (j = 1; j < = columns; j++)0for (j = 1; j < = columns; j++)4 for (j = 1; j < = columns; j++)24for (j = 1; j < = columns; j++)25 for (j = 1; j < = columns; j++)26________868______8for (i = 1; i < = rows; i++)55for (j = 1; j < = columns; j++)29for (j = 1; j < = columns; j++)30for (i = 1; i < = rows; i++)55for (j = 1; j < = columns; j++)32
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)4 for (j = 1; j < = columns; j++)35for (j = 1; j < = columns; j++)25 for (j = 1; j < = columns; j++)26________868______8for (i = 1; i < = rows; i++)55for (j = 1; j < = columns; j++)29for (j = 1; j < = columns; j++)30for (i = 1; i < = rows; i++)55for (j = 1; j < = columns; j++)32
******************** * * * * * * * * ********************3******************** * * * * * * * * ********************4 for (j = 1; j < = columns; j++)46for (j = 1; j < = columns; j++)47for (j = 1; j < = columns; j++)47 for (i = 1; i < = rows; i++)55 for (j = 1; j < = columns; j++)50 for (j = 1; j < = columns; j++)24for (j = 1; j < = columns; j++)47________0______47 ________0______0_5_____4____5
________7______6for (j = 1; j < = columns; j++)35for (j = 1; j < = columns; j++)47for (j = 1; j < = columns; j++)47 for (i = 1; i < = rows; i++)55 for (j = 1; j < = columns; j++)50 for (j = 1; j < = columns; j++)35for (j = 1; j < = columns; j++)47for (j = 1; j < = columns; j++)47 ________866______76
******************** * * * * * * * * ********************6for (j = 1; j < = columns; j++)67using8******** * * * * * * * * * * * * ********0for (j = 1; j < = columns; j++)70for (j = 1; j < = columns; j++)47 for (j = 1; j < = columns; j++)72
******************** * * * * * * * * ********************3******** * * * * * * * * * * * * ********3 for (j = 1; j < = columns; j++)75
******************** * * * * * * * * ********************6for (j = 1; j < = columns; j++)67using8******** * * * * * * * * * * * * ********6for (j = 1; j < = columns; j++)70for (j = 1; j < = columns; j++)47 for (j = 1; j < = columns; j++)72
for (j = 1; j < = columns; j++)_8
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)67for (j = 1; j < = columns; j++)86
for (j = 1; j < = columns; j++)_8
for (j = 1; j < = columns; j++)_8
#include <bits/stdc++.h>_00
#include <bits/stdc++.h>_01
for (j = 1; j < = columns; j++)88for (j = 1; j < = columns; j++)47 // C++ code for hollow rectangle20
#include <bits/stdc++.h>_05
for (j = 1; j < = columns; j++)_95
C#
#include <bits/stdc++.h>_07
#include <bits/stdc++.h>_08
using for (j = 1; j < = columns; j++)97
for (i = 1; i < = rows; i++)_34 for (i = 1; i < = rows; i++)35
for (j = 1; j < = columns; j++)0
for (j = 1; j < = columns; j++)0#include <bits/stdc++.h>15
for (j = 1; j < = columns; j++)0#include <bits/stdc++.h>17
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)40 for (i = 1; i < = rows; i++)3 #include <bits/stdc++.h>21for (i = 1; i < = rows; i++)5 if i == 1 or i == N or j == 1 or j == N33
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)5 for (j = 1; j < = columns; j++)2
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)4 for (j = 1; j < = columns; j++)5
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************3for (j = 1; j < = columns; j++)4 if i == 1 or i == N or j == 1 or j == N46
******************** * * * * * * * * ********************3for (i = 1; i < = rows; i++)9
******************** * * * * * * * * ********************6******************** * * * * * * * * ********************4 ******************** * * * * * * * * ********************5
for (i = 1; i < = rows; i++)_71#include <bits/stdc++.h>43
for (i = 1; i < = rows; i++)_71#include <bits/stdc++.h>45
for (i = 1; i < = rows; i++)_71******************** * * * * * * * * ********************33******** * * * * * * * * * * * * ********0******** * * * * * * * * * * * * ********30
******************** * * * * * * * * ********************6******** * * * * * * * * * * * * ********3
******************** * * * * * * * * ********************6******************** * * * * * * * * ********************33******** * * * * * * * * * * * * ********6******** * * * * * * * * * * * * ********30
******************** * * * * * * * * ********************3******** * * * * * * * * * * * * ********9
******************** * * * * * * * * ********************3******************** * * * * * * * * ********************45
for (j = 1; j < = columns; j++)8******** * * * * * * * * * * * * ********9
for (j = 1; j < = columns; j++)0
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********9
for (j = 1; j < = columns; j++)0
for (j = 1; j < = columns; j++)0#include <bits/stdc++.h>67
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)98 for (i = 1; i < = rows; i++)40 for (i = 1; i < = rows; i++)3 ******************** * * * * * * * * ********************56
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)5 if i == 1 or i == N or j == 1 or j == N77
for (j = 1; j < = columns; j++)8#include <bits/stdc++.h>79
for (j = 1; j < = columns; j++)0******** * * * * * * * * * * * * ********9
******** * * * * * * * * * * * * ********_9
#include <bits/stdc++.h>_83
PHP
******************** * * * * * * * * ********************_68
#include <bits/stdc++.h>_85
#include <bits/stdc++.h>_08
#include <bits/stdc++.h>_15
#include <bits/stdc++.h>_17
________7______71 #include <bits/stdc++.h>21******************** * * * * * * * * ********************73******************** * * * * * * * * ********************76
for (i = 1; i < = rows; i++)_9
for (j = 1; j < = columns; j++)0******************** * * * * * * * * ********************79******** * * * * * * * * * * * * ********7
for (j = 1; j < = columns; j++)0******************** * * * * * * * * ********************82******** * * * * * * * * * * * * ********7
for (j = 1; j < = columns; j++)0for (j = 1; j < = columns; j++)4using8******************** * * * * * * * * ********************79 ******************** * * * * * * * * ********************88******************** * * * * * * * * ********************79 ******************** * * * * * * * * ********************90******************** * * * * * * * * ********************73******** * * * * * * * * * * * * ********7________7______79________7______94
for (j = 1; j < = columns; j++)0for (i = 1; i < = rows; i++)9
for (j = 1; j < = columns; j++)8for (j = 1; j < = columns; j++)4 using8******************** * * * * * * * * ********************82 ******************** * * * * * * * * ********************88******************** * * * * * * * * ********************82 ******************** * * * * * * * * ********************90******************** * * * * * * * * ********************73******** * * * * * * * * * * * * ********7________7______82________7______94
for (j = 1; j < = columns; j++)8for (i = 1; i < = rows; i++)9
________7______3******************** * * * * * * * * ********************4using8******************** * * * * * * * * ********************79 using30for (j = 1; j < = columns; j++)50 ******************** * * * * * * * * ********************79 ******** * * * * * * * * * * * * ********16******************** * * * * * * * * ********************73 for (j = 1; j < = columns; j++)50 ________7______1______1
using38******************** * * * * * * * * ********************82 ******** * * * * * * * * * * * * ********16******************** * * * * * * * * ********************73 for (j = 1; j < = columns; j++)50 ******************** * * * * * * * * ********************79 ******** * * * * * * * * * * * * ********16******************** * * * * * * * * ********************82 for (j = 1; j < = columns; j++)50 ******************** * * * * * * * * ********************82 using48******************** * * * * * * * * ********************73 using50