I'm don't understand how to use modulo to shift my characters. When I type 'Z', I get a '[' instead of 'A'. I read elsewhere that I need to shift the key AND the inputed text - yes?
for (int i = 0, n = strlen(p); i < n; i++)
{
if (isalpha(p[i]))
{
if (isupper(p[i]))
{
char stringshifttext = ((p[i] + (k[i]-'A') % 26) + p[i]);
printf("%c", stringshifttext);
}
}
}