輸出需要在每個字符之間有空格,所以它應該像'? 。emanruoys itah W」,而不是像「emanruoysitahw」我怎麼對任何幫助做到這一點跟我已經寫的代碼感謝C#如何在不使用空格鍵的情況下在每個字符之間放置空格
using System;
namespace strings
{
class Program
{
static void Main(string[] args)
{
string inString= "What is your name?",outString="";
foreach(char c in inString)
{
outString = c + outString;
}
{
Console.WriteLine("" + outString);
}
}
}
}
你嘗試過這麼遠嗎?我們幫助您解決代碼中的問題,而不是考慮您的需求併爲您編寫代碼。 – Chris 2014-11-03 16:59:51
這是功課嗎? – 2014-11-03 17:00:15
[用於創建包含多個空白字符的字符串的替代項]的可能重複項(http://stackoverflow.com/questions/1716230/alternatives-to-for-creating-strings-containing-multiple-whitespace-characte) – JMK 2014-11-03 17:00:17