using System.Collections.Generic;
using System.Text;
{
class PrintMoney
{
/*
* 1000 1123 1234 .00
*/
static void Main(string[] args)
{
Program p = new Program();
p.Print(10346789.23);
}
void Print(double n)
{
string s = n.ToString();
int n1=(int)n;
int n2 =(int)((n - n1)*100);
Console.WriteLine(Billion(n1)+JiaoFen(n2));
{
string flag = "";
int i = n / 10;
int j = n % 10;
flag += PrintString(i.ToString()) + "角";
flag += PrintString(j.ToString()) + "分";
return flag;
}
{
string flag="";
int n1 = n / 10000;
int n2 = n % 10000;
string temp;
if (n1!=0)
{
temp = Yuan(n1);
flag += Yuan(n1).Substring(0,temp.Length-1);
}
flag += "万";
flag += Yuan(n2);
return flag;
{
string flag = "";
int a = n / 1000;
if (a != 0)
{
flag += PrintString(a.ToString()) + "仟";
}
int b = n % 1000 / 100;
if (b != 0)
{
if (flag.IndexOf("仟") == -1&&flag!="")
{
flag += "零";
}
flag += PrintString(b.ToString()) + "佰";
}
int c = n % 100 / 10;
if (c!=0)
{
if (flag.IndexOf("佰")==-1)
{
flag += "零";
}
flag += PrintString(c.ToString()) + "拾";
}
int d = n % 10;
if (d!=0)
{
if (flag.IndexOf("拾")==-1)
{
flag += "零";
}
flag += PrintString(d.ToString());
}
return flag + "元";
{
string flag = null;
switch (s)
{
case "0":
flag = "零";
break;
case "1":
flag = "壹";
break;
case "2":
flag = "贰";
break;
case "3":
flag = "叁";
break;
case "4":
flag = "肆";
break;
case "5":
flag = "伍";
break;
case "6":
flag = "陆";
break;
case "7":
flag = "柒";
break;
case "8":
flag = "捌";
break;
case "9":
flag = "玖";
break;
return flag;
}
}
}