//閏年的判斷條件格式
(year % 400 == 0 || year % 4 == 0 && year % 100 != 0)
//如果 年能被400整除 或者 年能被4整除 并且年不能被100整除。
(year % 400 == 0 || year % 4 == 0 && year % 100 != 0)
//如果 年能被400整除 或者 年能被4整除 并且年不能被100整除。
2020-08-15
程序中的變量名、常量名、類名、方法名,都叫做標識符。
①標識符只能由英文字母、數字和下劃線組成,不能包含空格和其他字符。
②變量名不能用數字開頭。
③不能用關鍵字當變量名。
①標識符只能由英文字母、數字和下劃線組成,不能包含空格和其他字符。
②變量名不能用數字開頭。
③不能用關鍵字當變量名。
2020-08-15
Console.WriteLine(true|| false);//輸出True
Console.WriteLine(true && false);//輸出False
Console.WriteLine(!false);//輸出True
Console.WriteLine(true && false);//輸出False
Console.WriteLine(!false);//輸出True
2020-08-14
最新回答 / qq_慕絲4581239
using System;using System.Collections.Generic;using System.Text;namespace Test{? ? class Program? ? {? ? ? ? static void Main(string[] args)? ? ? ? {? ? ? ? ? ? //聲明整型數組,保存一組整數? ? ? ? ? ? int[] num = new int[] { 3,34,43,2,11,19,30,55,20};? ? ? ? ? ? forea...
2020-08-13
最新回答 / STMF
4、int類型無法接收string類型,就是你的sum5、檢查代碼中是否有中文標點符號6、int avg = sum/8最好改成 sum/couple.Length
2020-08-07
最新回答 / qq_慕先生330273
? ? ? ? ? ? string[,]? sor=new string[,]? ? ? ? ? ? {{"吳松","89"},{"錢東宇","90"},{"伏晨","98"},{"陳陸","56"},{"周蕊","60"},{"林日鵬","91"},{"何昆","93"},{"關欣","85"}? ? ? ? ? ? };? ? ? ? ? ? //Console.WriteLine(sor.GetLength(0));? ? ? ? ? ? int Q = 0;? ? ? ? ? ? for (in...
2020-07-30
已采納回答 / sgoku
bool關鍵字是System.Boolean的別名(實際上bool是基本值類型,Boolean是對象;bool是C#中的,Boolean是.net Framework中的。其實它們倆是一樣啦,沒什么差別的),用于生成變量存儲布爾值true、false。bool數據類型在內存中占1個字節。
2020-07-28
最新回答 / qq_慕先生330273
? ? ? ? ? ? string[,]? sor=new string[,]? ? ? ? ? ? {{"吳松","89"},{"錢東宇","90"},{"伏晨","98"},{"陳陸","56"},{"周蕊","60"},{"林日鵬","91"},{"何昆","93"},{"關欣","85"}? ? ? ? ? ? };? ? ? ? ? ? //Console.WriteLine(sor.GetLength(0));? ? ? ? ? ? int Max = 0;? ? ? ? ? ? strin...
2020-07-24
- 課程須知
- 本課程是C#基礎課程,熱烈歡迎各位小伙伴拍磚吐槽?。?/dd>
- 老師告訴你能學到什么?
- 1、C#的基本概念 2、Visual Studio的使用技巧 3、C#的語法和程序邏輯
微信掃碼,參與3人拼團