Hi TheBigH! Thank you for your answer!
I tried putting a while loop at the bottom inside a for-loop, but it doesn't work; here's what I did:
Code:
printf("%i", keyword[j]);
while (keyword[j] == 0)
j++;
Then, I tried writing an if-condition within the if statement:
Code:
for (int j = 0; j < strlen(keyword); j++)
if (keyword[j] >= 'a' && keyword[j] <= 'z')
{
if (keyword[j] == 'a')
{
keyword[j] = keyword[j] - 'a';
j++;
}
else
keyword[j] = keyword[j] - 'a';
}
but that gives me completely different values when I enter a (it messes up the j count).
What am I doing wrong?