If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Ceasar Cipher Cracker, having problems

I am trying to write a program in Just Basic to crack a ceasar cipher, by doing a shift of 1 letter, then 2 letters, and on to 26 letters, and output to a text file. The idea is to try every possible cipher, so you can crack any ceasar cipher. I've got it to the point where it should do the 1st shift, the problem is if you input "b", it shows "a", but if you input "bbb", it still only shows "a", I need it to show "aaa", if you know what I mean, please help if you can, I'm pulling my hair out over here! (and thanks!)

Why delete? Would be better to even post how you solved it for other users. I don't use the Microsoft Stack(ASP.NET, VB, C#) but I think that the solution would be useful to another guy. So, do post your answer...thats the whole point of forums I think - the good of all.

The way you have this currently is not very practical, or up to par on coding conventions if I may point out. Arrays like that are a bit "sloppy".. Not sure about this language, but if you can you should probably just declare it as a string and index the chars individually, otherwise use the brackets { & } and have everything separated by comma.

What language is this? Right now I can only take a guess, but it would help if others knew what language you were using. This could have been VB.NET formatted in a more VB6 style... Although with the exception of these 2 lines, so i'm assuming it's some other .NET language that I haven't used yet.

Code:

input "Encrypted message:" ; encmsg$

Code:

print newmsg1$

I will say that you would only need one array for this though. (Really only one string actually.)