1000 1001 1110 1111 1001 1000 0110 0010
■ このスレッドは過去ログ倉庫に格納されています
0045デフォルトの名無しさん
NGNG1000 0010 1011 0010 1000 0010 1101 1111 1000 0010 1111 0001
1000 0010 1100 1000 1000 0010 1011 0011 1000 0010 1010 0010
1000 1111 1001 1111 1000 1110 1110 1000 1000 0010 1100 1001
1000 1001 1111 1100 1001 0001 1010 0010 1000 0010 1011 0101
1000 0010 1101 1100 1000 0010 1011 0101 1000 0010 1011 1101
1000 0001 0100 0010 0111 0011 0110 1111 0111 0101 0111 0010
0110 0011 0110 0101 0010 1110 0111 0100 0111 1000 0111 0100
1000 0010 1100 1001 1001 0011 1111 0001 1001 0000 0110 1001
1001 0101 0101 1100 1000 1011 0100 1100 1000 1111 1001 0001
1000 0010 1010 1011 1000 1101 1001 1110 1000 0010 1111 0001
1000 0010 1100 0101 1000 0010 1010 1001 1000 0010 1110 0111
1000 1110 1100 0000 1000 1101 0111 0011 1000 0001 0100 0010
#include<stdio.h>
int main()
{
FILE *stream;
static int c, d, i, j;
char result[1024];
if((stream = fopen("source.txt","rt")) == NULL) return -1;
while((c = fgetc(stream)) != EOF){
if(c == '0' || c == '1'){
d = (d << 1) | (c - '0'), ++i == 8? result[j++] = d, i = d = 0: 0;
}
}
fclose(stream);
result[j] = '\0';
if((stream = fopen("result.txt","wt")) == NULL) return -1;
fprintf(stream,"%s",result);
fclose(stream);
return 0;
}
■ このスレッドは過去ログ倉庫に格納されています