标签:运行程序 技术分享 接下来 for循环 并且 cst encode txt 打扰
1 #include <cstdio> 2 char str[110] = "664e06226625425d562e766e042d422c072c45692d125c7e6552606954646643"; 3 int jdg(int id){ 4 if(str[id] >= ‘0‘ && str[id] <= ‘9‘) 5 return str[id] - ‘0‘; 6 if(str[id] >= ‘A‘ && str[id] <= ‘F‘) 7 return str[id] - ‘7‘; 8 if(str[id] < ‘a‘ && str[id] > ‘f‘) 9 return 0xFFFFFFFFLL; 10 return str[id] - ‘W‘; 11 } 12 int calc(int x, int y){ 13 return 16 * jdg(x) + jdg(y); 14 } 15 int main(){ 16 for(int i = 0;i < 64;i += 2){ 17 printf("%d, ", calc(i, i + 1)); 18 } 19 return 0; 20 }
标签:运行程序 技术分享 接下来 for循环 并且 cst encode txt 打扰
原文地址:https://www.cnblogs.com/reddest/p/10124258.html