程序应该很简单的,就是在循环部分语法不会看(只学过 C) ,那位高手能帮我改为 C 程序啊,先谢谢了
{$APPTYPE CONSOLE}
Uses
SysUtils;
var nome,serial:string;
i,j:integer;
begin
writeln('######## Keygen for Step 2 by The Hellfish ########');
writeln;
write('Enter your name: '); readln(nome);
writeln;
if length(nome)>=4 then begin
j:=1;
for i:=1 to length(nome) do nome:=upcase(nome);
for i:=1 to 8 do
if nome<>#0 then
serial:=serial+inttohex(ord(nome)xor (80+i-1),2)
else begin
serial:=serial+inttohex(ord(nome[j])xor (80+i-1),2);
j:=j+1;
end;
writeln('Your code is: '+serial);
writeln;
writeln('#### Lie, Cheat and Steal! ####');
end
else
writeln('You must type at least 4 chars!!!');
readln;
end.