《21天學通C#》給多個變量賦值


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 給多個變量賦值
{
class Program
{
static void Main(string[] args)
{
//聲明並賦值多個變量
int my_variable = 8, your_varialble = 1000;

Console.WriteLine("my variable was assigned the value {0}", my_variable);
my_variable = 5;
Console.WriteLine("\nmy_variable contains the value {0}", my_variable);
Console.WriteLine("\nyour_variable contains the value {0}", your_varialble);
Console.WriteLine("按任意鍵退出程序!");
Console.ReadKey();
}
}
}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM