上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 36 下一页
摘要: static void Main(string[] arg) { int int1 = 0; int int2 = 0; int int3 = 0; string str1 = "adf"; string str2 = "adf"; string str3 = "Adf"; string str4 阅读全文
posted @ 2024-08-16 17:33 CSF践行 阅读(48) 评论(0) 推荐(0)
摘要: static void Main(string[] arg) { int intSum = 0; for (int i = 0; i <= 100; i++) { intSum += i; } Console.WriteLine(intSum); Console.ReadKey(); } stati 阅读全文
posted @ 2024-08-12 12:28 CSF践行 阅读(26) 评论(0) 推荐(0)
摘要: static void Main(string[] arg) { //while的3个练习 Console.WriteLine("请输入班级人数:"); int intNum = 0; while (!(int.TryParse(Console.ReadLine(), out intNum))) { 阅读全文
posted @ 2024-08-12 10:40 CSF践行 阅读(37) 评论(0) 推荐(0)
摘要: //输入任意年份,月份,判断该月份天数; static void Main(string[] args) { int intDay = 0; int intYear = 0; int intMonth = 0; //任意输入年份和月份, 判断该月有几天; try { Console.WriteLin 阅读全文
posted @ 2024-08-11 21:57 CSF践行 阅读(28) 评论(0) 推荐(0)
摘要: static void Main(string[] args) { double intSalary = 5000; bool bFlag = true; Console.WriteLine("请输入张三的评点等级:"); string strLevel = Console.ReadLine(); 阅读全文
posted @ 2024-08-11 17:27 CSF践行 阅读(28) 评论(0) 推荐(0)
摘要: static void Main(string[] args) { string strUsrName = ""; string strPwd = ""; Console.WriteLine("please input your UsrName:"); strUsrName = Console.Re 阅读全文
posted @ 2024-08-11 12:42 CSF践行 阅读(38) 评论(0) 推荐(0)
摘要: static void Main(string[] args) { int intNum = 0; bool bFlag = true; Console.WriteLine("请输入一个数字:"); try { intNum = Convert.ToInt32(Console.ReadLine()) 阅读全文
posted @ 2024-08-11 12:20 CSF践行 阅读(21) 评论(0) 推荐(0)
摘要: //比较运算符: // > // < // == // >= // <= // != //逻辑运算符 与&& 或|| 非! static void Main(string[] args) { while (true) { Console.WriteLine("请输入年份:"); int year = 阅读全文
posted @ 2024-08-10 17:16 CSF践行 阅读(22) 评论(0) 推荐(0)
摘要: static void Main(string[] args) { //五种复合运算符: // += // -= // *= // /= // %= double d1 = 0; double d2 = 0; d1 += 5; d1 = d1 + 5; d1 -= 5; d1 = d1 - 5; d 阅读全文
posted @ 2024-08-10 16:54 CSF践行 阅读(23) 评论(0) 推荐(0)
摘要: static void Main(string[] args) { //Convert转换:不同数据类型之间的转换; //大前提: 面儿上一定要过得去 Console.WriteLine("请输入你的姓名:"); string strName = Console.ReadLine(); Consol 阅读全文
posted @ 2024-08-10 15:16 CSF践行 阅读(33) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 36 下一页