string str="字符串"
int m_int=str.Length
for(m_int;m_int>=0;m_int--)
{
    char ch=m_int.Substring(m_int-1,1);
    Console.Write(ch);
}
你也可以使用栈来做或者队列来做!

解决方案 »

  1.   

    (3)using System;
    class AppClass
    {
    static void Main()
    {
    string fileName="yesadnyesno"; fileName=fileName.Replace("yes","no");//字符串替换为指定值
    Console.WriteLine(fileName);
    Console.ReadLine();
    }
    }
      

  2.   

    上面的不完整,没看清题目
    using System;
    class AppClass
    {
    static void Main()
    {
    string fileName=Console.ReadLine();
    fileName=fileName.Replace("no","yes");
    Console.WriteLine(fileName);
    Console.ReadLine();
    }
    }
      

  3.   

    (2)
    using System;namespace ConsoleApplication2
    {
    class Class1
    {
    [STAThread]
    static void Main(string[] args)
    {
    string temp = Console.ReadLine();
    char [] tempch = temp.ToCharArray(0,temp.Length); 
    for(int i = temp.Length -1; i>=0; i--)
    Console.Write(tempch[i]);
    Console.ReadLine();
    }
    }
    }
      

  4.   

    (3)字符串“supercalifragilisticexpialidocious”是因为太长了不能放到string变量里吗?为什么?
      I think maybe you have made mistakes,maybe,it should be that the object of String cannot be changed.Every time,When you use the method of System.String ,you must allocate location for it,  and if you use StringBuilder, the problem does not exist!
      

  5.   

    (6)编写一个控制台应用程序,它接受一个字符串,用“yes”替换字符串中所有的“no”
    use String.Replace(source_string,destination_string)//
    use Console.ReadLine() to get string from the input of the keyboard!~
    you just do it demter9999(不想说) told u do!
      

  6.   

    第5章第5题
    using System;namespace _1
    {
    /// <summary>
    /// Class1 的摘要说明。
    /// </summary>
    class Class1
    {
    /// <summary>
    /// 应用程序的主入口点。
    /// </summary>
    [STAThread]
    static void Main(string[] args)
    {
    //
    // TODO: 在此处添加代码以启动应用程序 //
    string userString;
    string[] myString;
    int mylength; Console.WriteLine("请输入一个字符:");
    userString=Convert.ToString(Console.ReadLine());
    mylength=userString.Length;



    for (int i=mylength-1;i>=0;i--)
    { Console.Write("{0}",userString.Substring(i,1)); }
    Console.WriteLine();


    }
    }
    }
      

  7.   

    第5章第6题
    using System;namespace 替换字符串
    {
    /// <summary>
    /// Class1 的摘要说明。
    /// </summary>
    class Class1
    {
    /// <summary>
    /// 应用程序的主入口点。
    /// </summary>
    [STAThread]
    static void Main(string[] args)
    {
    //
    // TODO: 在此处添加代码以启动应用程序
    //
    string userString;
    string replaceString; Console.WriteLine("请输入含有no的一串字符");
    userString=Convert.ToString(Console.ReadLine());
    replaceString=userString.Replace("no","yes"); Console.WriteLine("下面的将no替换成yes后的字符");
    Console.WriteLine(replaceString); }
    }
    }