General method of renminbi lowercase

zhaozj2021-02-16  144

The general method of renovation of renminbells. is acceptable

Const char * RMB (Double RMB) {IF (RMB <0) Return Null; Static Char * CCC [10] = {// Capital Form of Chinese Character "zero", "", "", "", "", "Wu", "Lu", "柒", "捌", ""}; static char * qqq [19] = {"points", "angle", ".", "Round", "Pick up", "", "仟", "10,000", "", "仟", "hundreds", "pick", "佰", "", "Wan", " "," "," "}; Static char Result [256], TMP [256]; Sprintf (TMP,"%. 2LF ", RMB); if (Strlen (TMP)> 19) Return Null; INT i = Strlen (TMP) -1, C; Char * srcptr = TMP, * DSTPTR = Result; Bool BPREVZERO = FALSE; for (; * srcptr; srcptr , I -) {IF (* srcptr == '.') Continue ; C = * srcptr-'0 '; if (c! = 0) {struct (DSTPTR, CCC [C]); DSTPTR = 2; if (srcptr == TMP && C == 1 && strcmp (QQQ [i] , "Picking") == 0) DSTPTR- = 2; STRCPY (DSTPTR, QQQ [I]); DSTPTR = 2; bprevzero = false; Continue;}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} (bprevzero) {IF (strcmp (QQQQ [i], " Round ") == 0 || Strcmp (QQQ [i]," 10,000 ") == 0 || Strcmp (QQQ [i]," 100 million ") == 0) {dstptr- = 2; * Dstptr = 0; IF (strcmp (DSTPTR-2, "100 million") {structure (dstptr, qqq qq [i]); DSTPTR = 2;} BPREVZERO = FALSE;}} else {IF (strcmp (QQQ [i], "round") && strcmp (QQQ [i], "10,000") && strcmp (QQQ [i], "100 million") {structure (DSTPTR , "Zero"); DSTPTR = 2; bprevzero = true;

转载请注明原文地址:https://www.9cbs.com/read-8507.html

New Post(0)