Comparative A2C.c

xiaoxiao2021-03-06  52

#include / * See the MM of the code leaves a name ~~ huh * / void main () {Double X, Y; char * ch [] = {"zero", "", "" , "", "", "Wu", "", "捌", ""}; char * ch1 [] = {"pick", "", "", " Wan "," pick "," "," 仟 "," hundred million "}; char number [256]; char SNUM [3]; long i, n, j, m, y1, t; printf (" INPUT: "); scanf ("% lf ", & x); n = (long) x; / * to achieve integer portions * / y = xn; / * Decimal part * /

/ * Process of multi-digit decimality as an integer * / t = y * 100 0.5;

For (i = 0; n! = 0; i ) / * places the integer part in the array * / {NUM [i] = (char) (N% 10); N / = 10;} m = i; Num [i] = '.';

For (i = 0; t! = 0; i ) / * will put decimal to the array process * / {SNUM [i] = (char) (T% 10); t / = 10;}

For (n = 0; N ) {if (NUM [n] == '.') / * N is already filled with * / {for (j = n-1; j> = 0; J -) / * Judgment is 10,000 yuan .. If it is determined whether it is 0 if it is 0, if it does not output zero. * / {if (m <= 5) IF (M == 5 && (int) Num [J ] == 0); Else Printf ("% s", ch [(int) NUM [j]); / * Output capital 壹 .. * / else if (m% 4 == 0 && (int) Num [J ] == 0); Else Printf ("% S", CH [(int) NUM [j]); if (m> = 2) {Printf ("% s", CH1 [M-2]); / * Output picks up .. If there is 2 digits, output pick * / m = m-;}}}}}}}); Break;}} IF (snum [0] snum [1]> 0) { IF (SNUM [0]> 0) Printf ("% s angle", CH [(int) snum [0]]); Else Printf ("zero"); if (SNUM [1]> 0) Printf ("% S points ", CH [(int) snum [0]]);} / * Output angle * /}

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

New Post(0)