Archived
1
0

optimise files

This commit is contained in:
2025-11-25 20:14:10 +08:00
Unverified
parent bb4a37acc4
commit 4e148364a9
171 changed files with 6555 additions and 0 deletions

26
CS/15.3/Program.cs Normal file
View File

@@ -0,0 +1,26 @@
namespace _15._3
{
internal class Program
{
static void Main(string[] args)
{
const string s4 = " ";
int nYear = DateTime.Today.Year;
int nMonth = DateTime.Today.Month;
DateTime d1 = new DateTime(nYear, nMonth, 1);
Console.WriteLine("{0}/{1}", d1.Year, d1.Month);
Console.WriteLine("SUN MON TUE WED THU FRI SAT");
int iWeek = (int)d1.DayOfWeek;
int iLastDay = d1.AddMonths(1).AddDays(-1).Day;
for (int i = 0; i < iWeek; i++)
{
Console.Write(s4);
}
for (int i = 1; i <= iLastDay; i++)
{
Console.Write(" {0:00} ", i);
if ((i + iWeek) % 7 == 0) Console.WriteLine();
}
}
}
}