zxp

时间:2024-11-01 16:47:10编辑:阿奇

二进制翻译一下

它们不是中文,是一串英文: Thrall and Jaina sitting in a tree, K-I-S-S-I-N-G 转换程序用pascal写成,程序如下: {$n+} uses high; var x:longint; s:string; y:byte; f:text; b:file of byte; begin assign(f,'二进制.in'); reset(f); assign(b,'b.out'); rewrite(b); while not eof(f) do begin read(f,x); str(x:0,s); y:=trunc(convert10(s,2)); write(b,y); end; close(f); close(b); end.


二进制翻译中文,谢谢

它们不是中文,是一串英文:
Thrall and Jaina sitting in a tree, K-I-S-S-I-N-G

转换程序用pascal写成,程序如下:
{$n+}
uses high;
var
x:longint;
s:string;
y:byte;
f:text;
b:file of byte;
begin
assign(f,'二进制.in'); reset(f);
assign(b,'b.out'); rewrite(b);
while not eof(f) do begin
read(f,x);
str(x:0,s);
y:=trunc(convert10(s,2));
write(b,y);
end;
close(f);
close(b);
end.


上一篇:冷却塔维修

下一篇:没有了