"); //-->
#include<stdio.h> #define uchar unsigned char uchar mul_table_pro[45]= { 1, 2,4, 3,6,9, 4,8,12,16, 5,10,15,20,25, 6,12,18,24,30,36, 7,14,21,28,35,42,49, 8,16,24,32,40,48,56,64, 9,18,27,36,45,54,63,72,81 }; uchar multi1[10]={0,1,3,6,10,15,21,28,36,45}; uchar mul_pro(uchar x,uchar y) { uchar z; if(x>y) { z=mul_table_pro[multi1[x-1]+y-1]; } else { z=mul_table_pro[multi1[y-1]+x-1]; } return z; } int main() { uchar i; i=mul_pro(6,9); printf("%d\n",i); getchar(); }
运行现象:
*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。