第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

這個怎么給temp賦值呢,可以隨便賦值嗎例如string=temp?還有下面{0},{1}是什么鬼完全不會了。求給位大佬幫幫忙

using System;

using System.Collections.Generic;

using System.Text;


namespace Test

{

? ? class Program

? ? {

? ? ? ? static void Main(string[] args)

? ? ? ? {

? ? ? ? ? ? string today;//今天的午飯

? ? ? ? ? ? string tomorrow;//明天的午飯

? ? ? ? ? ? today = "魚香肉絲";

? ? ? ? ? ? tomorrow = "小雞燉蘑菇";

? ? ? ? ? ? //請在這里補(bǔ)充代碼,實現(xiàn)變量today和tomorrow的交換

? ? ? ? ? ??

? ? ? ? ? ??

? ? ? ? ? ??

? ? ? ? ? ??

? ? ? ? ? ??

? ? ? ? ? ??

? ? ? ? ? ??

? ? ? ? ? ? //打印

? ? ? ? ? ? Console.WriteLine("我今天吃{0},明天吃{1}。",today,tomorrow);

? ? ? ? }

? ? }

}


正在回答

3 回答

using System;

using System.Collections.Generic;

using System.Text;


namespace Test

{

? ? class Program

? ? {

? ? ? ? static void Main(string[] args)

? ? ? ? {

? ? ? ? ? ? string today;//今天的午飯

? ? ? ? ? ? string tomorrow;//明天的午飯

? ? ? ? ? ? today = "魚香肉絲";

? ? ? ? ? ? tomorrow = "小雞燉蘑菇";

? ? ? ? ? ? Console.WriteLine("我今天吃{1},明天吃{0}。",today,tomorrow);

? ? ? ? }

? ? }

}

怎么辦我是不是懶到家了

2 回復(fù) 有任何疑惑可以回復(fù)我~
#1

錫紙大大

66666
2020-02-11 回復(fù) 有任何疑惑可以回復(fù)我~

using System;
using System.Collections.Generic;
using System.Text;

namespace Test
{
??? class Program
??? {
??????? static void Main(string[] args)
??????? {
??????????? string today;//今天的午飯
??????????? string tomorrow;//明天的午飯
??????????? today = "魚香肉絲";
??????????? tomorrow = "小雞燉蘑菇";
??????????? //請在這里補(bǔ)充代碼,實現(xiàn)變量today和tomorrow的交換
??????????? string temp;
??????????? temp=today;
??????????? today=tomorrow;
??????????? tomorrow=temp;
??????????? //打印
??????????? Console.WriteLine("我今天吃{0},明天吃{1}。",today,tomorrow);
??????? }
??? }
}


你用這個調(diào)試運行試試看,你就知道你錯誤在哪里了,這個是我剛剛寫的正確的, 大括號里頭的0 1都表示是占位符,必須從0開始編排,0對應(yīng)的是today,1對應(yīng)的是tomorrow,today對應(yīng)的是魚香肉絲,tomorrow對應(yīng)的是小雞燉蘑菇,那么通過string temp,定義了一個空瓶子,然后將today與tomorrow進(jìn)行的一個交換就是你現(xiàn)在看到的答案了,這么寫你應(yīng)該能明白了吧!

3 回復(fù) 有任何疑惑可以回復(fù)我~
#1

慕函數(shù)9082697

我是小白,哈哈我看懂了,謝謝大佬
2019-07-30 回復(fù) 有任何疑惑可以回復(fù)我~
#2

weixin_慕斯卡1193446

為什么{0}是代表了today,是什么規(guī)則嗎
2020-10-29 回復(fù) 有任何疑惑可以回復(fù)我~

temp=today; today=tomorrow; tomorrow=temp;? 就好了。至于0 .1? 是指的變量的位置

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

檸檬九歌

下面的{0},{1}是另一種書寫格式嗎
2018-10-16 回復(fù) 有任何疑惑可以回復(fù)我~
#2

慕華1132107218 回復(fù) 檸檬九歌

這代表著占位符
2018-10-16 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

這個怎么給temp賦值呢,可以隨便賦值嗎例如string=temp?還有下面{0},{1}是什么鬼完全不會了。求給位大佬幫幫忙

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號