《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