<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-295  評論-26  文章-1  trackbacks-0

    #include <iostream.h>
    #include <string>
    char* strToBinary(int x);
    char* strToHex(int i);
    char* transToGKB(char *t);

    int main ()

    {
    char *p=strToBinary(233);
    //cout<<p;

    //cout<<strToHex(233);
    cout<<transToGKB("商");
    return 0;
    }
    char* transToGKB(char *t){
    ?int res=0;
    ?? int intlen;
    ?? intlen=strlen(t);
    ?? if(intlen>1){
    ??? char *result=new char[5];
    ?? int i=0;
    ?if(0>t[0]){
    ??? res=256+t[0];
    ? }
    ?char *p1=strToHex(res);
    ?if(0>t[1]){
    ??res=256+t[1];
    ?}
    ?char *p2=strToHex(res);
    ?result=p1;
    ?result[2]=p2[0];
    ?result[3]=p2[1];?
    ?result[4]='\0';?
    ?return result;
    ?}
    ?? else{
    ??? //if(t[0]>64)
    ??? char * p=new char[3];
    ??? p=strToHex(t[0]);
    ??? p[2]='\0';
    ??? return? p;
    ?? }

    }

    ?

    //數字轉為二進制(255以內的正數)
    char* strToBinary(int i){
    ?char *result=new?? char[9];
    ?int n=1;
    ?int m;
    ?int c=0;
    ?int j=8;
    ?for(c=0;c<8;c++){
    ??m=i%2;
    ??j=j-1;
    ??i=n=i/2;
    ??if(n>=0){
    ???if (m>0){
    ????result[j]='1';
    ???}else
    ???{
    ????result[j]='0';
    ???}?
    ??}
    ??
    ?}
    ?result[8]='\0';
    ?
    //?cout<<result;
    ?return result;
    }
    //數字轉為十六進制(255以內的正數)
    char* strToHex(int i){
    ?char *result=new?? char[3];
    ?int n=1;
    ?int m;
    ?int c=0;
    ?int j=2;
    ?for(c=0;c<2;c++){
    ??m=i%16;
    ??j=j-1;
    ??i=n=i/16;
    ??if(n>=0){
    ???if (m>0){
    ????if (m==1){
    ????????????????? result[j]='1';
    ????}
    ????else if (m==2){
    ?????result[j]='2';
    ????}
    ????else if (m==3){
    ?????result[j]='3';
    ????}
    ????else if (m==4){
    ?????result[j]='4';
    ????}
    ????else if (m==5){
    ?????result[j]='5';
    ????}
    ????else if (m==6){
    ?????result[j]='6';
    ????}
    ????else if (m==7){
    ?????result[j]='7';
    ????}
    ????else if (m==8){
    ?????result[j]='8';
    ????}
    ????else if (m==9){
    ?????result[j]='9';
    ????}
    ????else if (m==10){
    ?????result[j]='A';
    ????}
    ????else if (m==11){
    ?????result[j]='B';
    ????}
    ????else if (m==12){
    ?????result[j]='C';
    ????}
    ????else if (m==13){
    ?????result[j]='D';
    ????}
    ????else if (m==14){
    ?????result[j]='E';
    ????}
    ????else if (m==15){
    ?????result[j]='F';
    ????}
    ???}else
    ???{
    ????result[j]='0';
    ???}?
    ??}
    ?}
    ?result[2]='\0';
    ?return result;
    }



    大盤預測 國富論
    posted on 2009-03-19 16:37 華夢行 閱讀(183) 評論(0)  編輯  收藏 所屬分類: C
    主站蜘蛛池模板: 黑人精品videos亚洲人| 亚洲国产精品狼友中文久久久| 国产成人亚洲综合色影视| 高h视频在线免费观看| 亚洲?v女人的天堂在线观看| 美女视频黄a视频全免费网站一区| 国产在线播放免费| 国产亚洲精品AAAA片APP| 国产裸模视频免费区无码| 男女猛烈xx00免费视频试看| 日韩亚洲精品福利| 国产乱子伦精品免费视频| 亚洲人成人77777网站| 嫩草成人永久免费观看| 亚洲高清美女一区二区三区| 四虎最新永久免费视频| 国产成+人+综合+亚洲专| 日韩中文字幕在线免费观看| 朝桐光亚洲专区在线中文字幕| 高清在线亚洲精品国产二区| www在线观看免费视频| 亚洲AV成人一区二区三区AV| 国产在线观看麻豆91精品免费| 亚洲国产日韩视频观看| 免费国产不卡午夜福在线| 国产精品美女久久久免费 | 亚洲精品资源在线| 成人午夜性A级毛片免费| 精品视频免费在线| 亚洲精品免费在线观看| 久久久久国色AV免费观看性色 | 亚洲人成片在线观看| 免费看片免费播放| 一本大道一卡二大卡三卡免费| 日产亚洲一区二区三区| 在线观着免费观看国产黄| 日本免费高清视频| 亚洲国产精品无码久久久秋霞1| 在线亚洲午夜理论AV大片| 五月亭亭免费高清在线| jizz免费在线观看|