using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Star
{
class Program
{
static void Main(string[] args)
{
rectangle(Convert.ToInt32(Console.ReadLine()), Convert.ToInt32(Console.ReadLine()));
Console.Read();
}
static void rectangle(int h,int w)
{
string star = "*";
for (int i = 0; i < h; i++)
{
if (i == 0 || i == (h - 1))
Console.Write(star.PadLeft(w , '*'));
else
{
Console.Write(star);
Console.Write("".PadLeft(w - 2, ' '));
Console.Write(star);
}
Console.WriteLine();
}
}
}
}
是控制台程序嘛