Well my school is doing this cipher challenge and i can do it but changing it all back to english takes for every is there any way i can change every like 'x' to 'a' or do i have to do it all by hand
Thanks
Well my school is doing this cipher challenge and i can do it but changing it all back to english takes for every is there any way i can change every like 'x' to 'a' or do i have to do it all by hand
Thanks
I see Now, says the blind man
What's a cipher challenge ?
If you're talking about a scar, you can explode your string and than replace any x with a or whatever.
Post a sample cipher with the solved one (preferably something like The quick fox jumped over the lazy dog, so it has all the letters), and I can whip up a fast script that'll replace everything really fast.
~Sandstorm
Here ya go sandstorm
and the cipher for it isCode:The quick fox jumped over the lazy dog
if the value is + 2
Its in caps as ciphers asways areCode:VJG SWKEM HQZ LWORGF QXGT VJG NCBA FQI
I think its right but will check
Also this is a plus 2 so in a alphabet wheel to find it out i would move 2 along so depending on the + 'a' could stand for anything from 'a'to 'z' but if the a stands for 'a' its not 'a' cipher
Last edited by rya; 10-01-2009 at 11:53 PM.
I see Now, says the blind man
Forgot one word, can you change brown over?
Edit:
Nevermind, I figured out what you meant by the +2.
~Sandstorm
yea brown would be
DTQYP
Rember it needs to work with diffrent +'s (im showing you plus 2)
I see Now, says the blind man
Alright, just got to get one thing working.
~Sandstorm
Thanks
I see Now, says the blind man
SCAR Code:program New;
const
Adjustment = 2;
Input = 'The quick fox jumped over the lazy dog';
var
i, cMin, cMax, c: Integer;
s: string;
begin
s := UpperCase(Input);
cMin := Ord('A');
cMax := Ord('Z');
for i := 1 to Length(Input) do
begin
c := Ord(s[i]);
if InRange(c, cMin, cMax) then
begin
c := c + Adjustment;
if (c < cMin) then
c := cMax - (cMin - c) + 1
else if (c > cMax) then
c := cMin + (c mod cMax) - 1;
s[i] := Chr(c);
end;
end;
WriteLn(s);
end.
This should do it:
Place the string you want to replace in the Codecrack constant, and the number it increases by in the Plus constant.
SCAR Code:program new;
var
i : integer;
return : string;
cipherreturn : byte;
const
codecrack = 'The quick fox jumped over the lazy dog.';
Plus = 2;
begin
For I := 0 to length(codecrack) - 1 do
begin
If codecrack[i + 1] = ' ' then
begin
return := return + ' ';
continue;
end;
If ((getkeycode(codecrack[i + 1])) > 90) or ((getkeycode(codecrack[i + 1])) < 65) then
begin
return := return + codecrack[i + 1];
continue;
end;
If (getkeycode(codecrack[i + 1]) + plus) > 90 then
begin
cipherreturn := getkeycode(codecrack[i + 1]) + plus - 26;
return := return + chr(cipherreturn);
end else
begin
cipherreturn := getkeycode(codecrack[i + 1]) + plus;
return := return + chr(cipherreturn);
end;
end;
writeln(return);
end.
Should ignore all punctuation, and return all the letters correctly.
Edit:
Lol, you're mean Nielsie ^.^.
~Sandstorm
Sorry, couldn't resist
Want me to delete my post? xD
Nielsie/sandstorm your great thanks
I see Now, says the blind man
There are currently 1 users browsing this thread. (0 members and 1 guests)