using System;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
//中文字符数组:数组元素的索引号与中文对应
//例如:0-->零, 1-->一, … , 9-->九
char[] cnum =
{ '零', '一', '二', '三', '四',
'五', '六', '七', '八', '九' };
//输入一个数字,并转化成整型数
int v = int.Parse(Console.ReadLine());
//sb中存放转化为中文数组表示
StringBuilder sb = new StringBuilder();
//以下循环,逐一取出输入数字的个位,然后
//以取出个位的值为索引,找到对应的中文
while (v != 0)
{
int i = v % 10;
sb.Insert(0, cnum[i]);
v /= 10;
}
//显示转化成中文的数组
Console.WriteLine(sb.ToString());
Console.WriteLine("按任意键退出");
Console.ReadKey();
}
}
}