stringvar x;
stringvar xx:="";
numbervar z;
numbervar i;
x := totext();
x := replace(x,"-","");
x := replace(x,"¥","");
x := replace(x,",","");
x := replace(x,".","");
z := length(x);
for i := z to 1 step -1 do
(stringvar temp:=mid(x,z-i+1,1);
select i
case 12 : xx := temp + "十"
case 11 : xx := xx + temp + "億"
case 10 : xx := xx + temp + "仟"
case 9 : xx := xx + temp + "佰"
case 8 : xx := xx + temp + "拾"
case 7 : xx := xx + temp + "萬"
case 6 : xx := xx + temp + "仟"
case 5 : xx := xx + temp + "佰"
case 4 : xx := xx + temp + "拾"
case 3 : xx := xx + temp + "元"
case 2 : xx := xx + temp + "角"
case 1 : xx := xx + temp + "分"
); stringvar test="";
z := length(xx);
i:=1;
while i"0" and (mid(xx,i+1,1)="億" or mid(xx,i+1,1)="萬" or mid(xx,i+1,1)="元") then
(xx :=left (xx,i-1 )+replace(xx,mid(xx,i,1) ,"" ,i , 1);
)else if mid(xx,i-2,1)<>"0" and i+2"0" then
(xx :=left (xx,i )+replace(xx,mid(xx,i+1,1) ,"" ,i+1 , 1);
)else if mid(xx,i+1,1)="角" and mid(xx,i+2,1)<>"0" then
(xx :=left (xx,i )+replace(xx,mid(xx,i+1,1) ,"" ,i+1 , 1);
)else
(i := i-1;
xx :=left (xx,i )+replace(xx,mid(xx,i+1,2) ,"" ,i+1 , 1);));
i:=i+1;
z:=length(xx);
);xx := replace(xx,"0","零");
xx := replace(xx,"1","壹");
xx := replace(xx,"2","貳");
xx := replace(xx,"3","叄");
xx := replace(xx,"4","肆");
xx := replace(xx,"5","伍");
xx := replace(xx,"6","陸");
xx := replace(xx,"7","柒");
xx := replace(xx,"8","捌");
xx := replace(xx,"9","玖");
xx := xx + "整"+test;
purchaseimportordersearch.startid = (currentpage - 1) * pagesize + 1;
purchaseimportordersearch.endid = purchaseimportordersearch.startid + pagesize - 1;
int pagecount = (saleorderdetaillist.count + pagesize - 1) / pagesize;
水晶報表 人民幣大寫轉換函式
當您需要做乙個諸如出入庫單的報表時,經常會用到人民幣總金額的彙總,並希望列印出來的時候有人民幣的大寫,所以您需要插入乙個sum函式來進行合計,那麼合計出來的阿拉伯數字的人民幣如何轉換成中文大寫呢?以下 將幫你完 民幣大寫的轉換,您必須新增乙個字串型別的未邦定字段到您的水晶報表,然後將上面您已經sum...
人民幣支付
描述 輸入一指定金額 以元為單位 然後輸出支付該金額的各種面額的人民幣數量,顯示100 元,50 元,20 元,10元,5 元,1元各多少張,盡量使用大面額。輸入 輸入乙個小於 1000 的正整數。輸出 分行輸出,每行顯示乙個整數,從上到下分別表示 100元,50元,20元,10元,5元,1元人民幣...
人民幣問題
時間限制 1 sec 記憶體限制 128 mb 提交 180 解決 129 統計給出任意的人民幣 100 100 元 求兌換成5元 2元和1元幣值 要求三種幣值均有 的方法有多少種。輸入任意的人民幣 100 100 元 的整幣。計算出兌換成5元 2元和1元幣值 要求三種幣值均有 的方法有多少種。10...