using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace 第三天_C_Sharp运算符 { //练习,变成实现几天是几周零几天? class Program { static void Main(string[] args) { int days = 46; int weeks = days / 7; int day = days % 7; Console.WriteLine("{0}是{1}周零{2}天",days,weeks,day); //占位符的使用------与格式化输出字符区别?? Console.ReadKey(); } } }
时间: 2024-12-28 22:09:59