using System;
namespace day0530
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("请输入年份");
int year = int.Parse(Console.ReadLine());
// int month=1;
// int day=1;
//int week=GetWeekByDay(year,month,day);
//bool leapYear = IsLeapYear(year);
WriteYear(year);
Console.ReadLine();
}
/*private static void Fun1()
{
Console.WriteLine("Fun1被开始执行了!");
string str = "012345!";
string name1 = str.Remove(3);//去除第3位之后的数据
Console.WriteLine(str);
string name2= str.Replace('3','9');//把字符'3'换成'9'
Console.WriteLine(str);
bool bo1= str.StartsWith('0');//判断字符串的第一个字符是否为'0'
Console.WriteLine(str);
bool bo2=str.Contains('6');//判断字符串中是否含有字符'6'
Console.WriteLine(str);
Console.WriteLine("name1="+name1+ ",name2=" + name2 + ",bol1=" + bo1 + ",bol2=" + bo2);
Console.WriteLine("Fun1被执行完成了!");
//Console.ReadLine();
}
*/
private static void WriteYear(int year)
{
C#入门6——年历显示
最新推荐文章于 2022-07-12 15:30:59 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)