满意答案
arycatsz19
2016.12.01
采纳率:50% 等级:8
已帮助:511人
123456789101112131415161718192021int const map[] = { //a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z 0, 0, 100, 500, 0, 0, 0, 0, 1, 0, 0, 50, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 10, 0, 0}; void roman(char* p) { int t = 0; char* r = p; while (!(*r 'Z')) { if (*(r+1) && map[*r - 'A']
追答:1234567891011121314151617181920212223242526272829303132int const map[] = { //a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z 0, 0, 100, 500, 0, 0, 0, 0, 1, 0, 0, 50, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 10, 0, 0}; int roman(char* p) { int t = 0; char* r = p; while (!(*r 'Z')) { if (*(r+1) && map[*r - 'A']
00分享举报