使用變量存儲以下商品信息,并打印輸出
(1) 品牌(brand):愛國者F928
(2) 重量(weight):12.4
(3) 電池類型(type):內(nèi)置鋰電池
(4) 價格(price):499?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace task03
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? string brand = "愛國者F928";
? ? ? ? ? ? double weight = 12.4;
? ? ? ? ? ? string type = "內(nèi)置鋰電池";
? ? ? ? ? ? decimal price = 499m;
? ? ? ? ? ? Console.WriteLine("此商品信息是:\n品牌"+brand
? ? ? ? ? ? ? ? +"\n重量"+weight
? ? ? ? ? ? ? ? +"\n電池類型"+type
? ? ? ? ? ? ? ? +"\n價格:"+price);
? ? ? ? ? ? Console.ReadKey();
? ? ? ? }
? ? }
}