Re: mod 95 vigninere cipher
i have had a look at various ways but i dont really understand how to use the %
Re: mod 95 vigninere cipher
Are you talking about the modulus operator (that's denoted by the % sign)?
Code Java:
5 % 3; // performs "5 modulo 3", returns the remainder of 5/3, or 2.
Re: mod 95 vigninere cipher
well it says mod not sure if it can be done using modulus
Re: mod 95 vigninere cipher
Normally in computer science mod is the short way of saying modulus (or modulo, depending on the conjugation), and in Java this is denoted with the % operator.
A modulo operation will naturally limit you to a range [0,x) (where x is the divisor, using set inclusion/exclusion notation).
So if you wanted a range [1, 95], you can translate this to num % 95 + 1;