哪里出錯了
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? int _num1 = 5;//第一個加數
? ? ? ? ? ? int _num2 = 7;//第二個加數
? ? ? ? ? ? int #sum=_num1+_num2;//求和
? ? ? ? ? ? Console.WriteLine("和是{0}",#sum);//打印結果
? ? ? ? }
? ? }
}
2022-07-21
①標識符只能由英文字母、數字和下劃線組成,不能包含空格和其他字符。
②變量名不能用數字開頭。
③不能用關鍵字當變量名。
看第一條,"#"號,不能出現在變量名中哦
搜索
復制