Hello, I've been working on a affine cipher encryptor/decryptor, but am having trouble keeping track of my "if" statements. Here is the part of my code that doesn't work:
If Modulo(Int((26 / a)), 26) <> 1 Then k = Modulo(a, 26)
If Modulo(Int((a / k)), a) <> 1 Then l = Modulo(k, a)
If Modulo(Int((k / l)), k) <> 1 Then m = Modulo(l, k)
If Modulo(Int((l / m)), l) <> 1 Then MsgBox "a and 26 are not coprime"
End If
End If
End If
End If
I know that the problem is in this part somewhere, since I tried running everything before adding this, and it worked. Anyways, the message that appears is "End If without block If", so it has something to do with my "if" statements being ended improperly or missing some additional terms. If anyone can help me with this, it would be greatly appreciated!
Bookmarks