這是我迄今爲止我會如何製作凱撒密碼解密器?
namespace CaesarDecrypter
{
class Reader
{
static void Main(string[] args)
{
//Display Welcome Message
Console.WriteLine("Welcome To The Caesar Cypher Decryption Program");
Console.WriteLine("***********************************************");
Console.WriteLine("Beggining Decryption:");
Console.WriteLine("\n\n Content:\n\n");
//Loop the program till given a command.
bool Loop = true;
while (Loop == true)
{
//Read in Text From File
String text = File.ReadAllText(@"C:\Users\Grimswolf\Desktop\Text Folder\caesarShiftEncodedText.txt");
//Display The File Text
foreach (char c in text)
{
//Not Sure What to do here?
Console.WriteLine(text);
Console.WriteLine("\n\n");
}
Console.WriteLine("Do you with to continue? Enter no to exit application.");
//Enter "no" to exit the loop
String Answer = Console.ReadLine();
if (Answer == "no")
{
// set loop bool to false so it exits the program.
Loop = false;
}
}
}
}
}
我需要它不斷通過字母前進,找到一個方法來轉移X的地方破解暗號。例如輸出看起來解密移
0 exxego前srgi
1 dwwdfn DW rqfh
2 cvvcem CV qpeg
3個buubdl BU podf
4攻擊一次
等
你有沒有decyphered文本?你怎麼知道X是否正確?無論是一個人都需要看它,或者你需要一個詞頻數據庫。 – vidstige