导入与导出(转 转 转)

#include <iostream>
using namespace std;
int main(){
    freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);
    string c;
    cin>>c;
    int i=c.size();
    int cc[i];
    for(int j=0;j<i;j++){
        cc[j]=c[j];
        while(cc[j]!=0 && cc[j]!=1) {
            cout<<cc[j]%2;
            cc[j]/=2;
        }
        cout<<cc[j]<<" ";
    }
    return 0;
}

 

posted @ 2024-07-29 14:51  -刘-j-x-  阅读(7)  评论(0编辑  收藏  举报