2019-12-04

使用變量存儲以下商品信息,并打印輸出

(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();

? ? ? ? }

? ? }

}

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關(guān)閱讀更多精彩內(nèi)容

  • using System; using System.Collections.Generic; using Sys...
    熙洛洛閱讀 182評論 0 0
  • 求四位會員卡號之和 (1) 鍵盤輸入四位數(shù)字的會員卡號 (2) 使用“/”和“%”運算符分解獲得會員卡各個位上的數(shù)...
    2f0fae0b4b67閱讀 133評論 0 0
  • using System; using System.Collections.Generic; using Sys...
    熙洛洛閱讀 98評論 0 0
  • using System; using System.Collections.Generic; using Sys...
    熙洛洛閱讀 139評論 0 0
  • 在控制臺輸出商品價目表 using System; using System.Collections.Generi...
    2f0fae0b4b67閱讀 437評論 0 0

友情鏈接更多精彩內(nèi)容