📄 d2hz.c
字号:
#include <stdio.h>#include <string.h>#include "supp.h"void str2str (char *s){ char *h, *t; int d, c; int utype1, utype2, dtype; int slen; if (!s) {
printf ("零\n");
return;
}
slen = strlen (s); h = s; t = s+slen-1; d = utype1 = utype2 = dtype = 0; for (;t>=h;t--) { c = (*t) - '0'; if (utype2>0 && utype1 ==0) push (utype2, 2); if (c) push (utype1, 1); push (c, 0); d++; utype1 = d % 4; utype2 = (d / 4) % 3; if (d > 8 && utype2 ==0) utype2++; } dump(); return;}
void longtostr (long n)
{
char s[12];
sprintf (s, "%ld", n);
str2str (s);
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -