Main.cs
usingSystem;classProgram {-
publicstaticintMain() { -
intline;//строка -
intcolumn;//столбец -
charfill;//заполнитель -
charfill_no=' ';//заполнение пустоты -
Console.Write("Введите количество строк : "); -
line=int.Parse(Console.ReadLine()); -
Console.Write("Введите количество столбцов : "); -
column=int.Parse(Console.ReadLine()); -
Console.Write("Введите заполнитель : "); -
fill=(char)Console.Read(); -
Console.WriteLine(); -
for(inti=0; i<line; i++) { -
for(intj=0; j<column; j++) { -
if(i==0 | j==0 | i==line-1 | j==column-1) { -
Console.Write(fill); -
} -
else{ -
Console.Write(fill_no); -
} -
} -
Console.WriteLine(); -
} -
Console.ReadKey(); -
return0; -
} }
usingSystem;classProgram {-
publicstaticintMain() { -
intline;//строка -
intcolumn;//столбец -
charfill;//заполнитель -
charfill_no=' ';//заполнение пустоты -
Console.Write("Введите количество строк : "); -
line=int.Parse(Console.ReadLine()); -
Console.Write("Введите количество столбцов : "); -
column=int.Parse(Console.ReadLine()); -
Console.Write("Введите заполнитель : "); -
fill=(char)Console.Read(); -
Console.WriteLine(); -
for(inti=0; i<line; i++) { -
for(intj=0; j<column; j++) { -
if(i==0 | j==0 | i==line-1 | j==column-1) { -
Console.Write(fill); -
} -
else{ -
Console.Write(fill_no); -
} -
} -
Console.WriteLine(); -
} -
Console.ReadKey(); -
return0; -
} }
Введите количество строк : 6
Введите количество столбцов : 6
Введите заполнитель : *
******
* *
* *
* *
* *
******
Введите количество столбцов : 6
Введите заполнитель : *
******
* *
* *
* *
* *
******