- static void Main(string[] args)
- {
- //接收用戶輸入的字符串,將其中的字符以與輸入相反的順序輸出。
- Console.WriteLine("Give me a string:");
- string mystring = Console.ReadLine();
- string myresult = "";
- for (int i = mystring.Length - 1; i >= 0; i--)
- {
- myresult += mystring[i];//或者myresult += mystring.Substring(i,1);
- }
- Console.WriteLine("The result is {0}:",myresult);
- Console.ReadKey();
- }
創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司,專注成都網(wǎng)站制作、成都做網(wǎng)站、網(wǎng)站營銷推廣,域名注冊(cè),網(wǎng)頁空間,網(wǎng)站改版維護(hù)有關(guān)企業(yè)網(wǎng)站制作方案、改版、費(fèi)用等問題,請(qǐng)聯(lián)系創(chuàng)新互聯(lián)。
當(dāng)前標(biāo)題:(C#)將用戶輸入的字符串相反輸出
標(biāo)題路徑:http://www.rwnh.cn/article12/jjsgdc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供用戶體驗(yàn)、手機(jī)網(wǎng)站建設(shè)、響應(yīng)式網(wǎng)站、網(wǎng)站策劃、云服務(wù)器、品牌網(wǎng)站設(shè)計(jì)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)