问答详情
源自:1-1 .NET简介

字符串的反转

例如输入:hello everone, 输出enoreve olleh

提问者:qq_追梦者_18 2017-12-11 15:14

个回答

  • 异凉聪
    2017-12-11 19:52:23

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

    namespace Test
    {
        class Program
        {
            static void Main(string[] args)
            {
                string[,] ov ={{"h","e","l","l","o"," "},{"eve","r","y","o","n","e"}};
                for(int a=0;a<2;a++)
                Console.Write("{0}{1}{2}{3}{4}{5}"+" ",ov[a,5],ov[a,4],ov[a,3],ov[a,2],ov[a,1],ov[a,0]);
            }
        }
    }