I'm solving the decryption problem in C language
There's a problem.
There's a process of counting the vowels in the string,
code not reading the number of vowels properly in that 'countingmeasure'
I was so curious that I debugged it,
count ++ doesn't work at'o'.
I'm really curious why this is happening
#include <stdio.h>
int main(void)
{
char original[15] = { 't','f','l','e','k','v','i','d','v','r','j','l','i','v',NULL };
printf("암호화된 문자열 : %s\n", original);
printf("원본 가능 문자열 \n");
printf("\n");
for (int j = 0; j < 26; j++)//모음이 7개일때만 출력을 어떻게 시킬까?
{
char change[14] = { 0 };
int counter=0;
char a;
for (int i = 0; i < 14; i++)
{
a = original[i] + j;
if (a > 122)
{
original[i] -= 26 ;
}
if (a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u')
{
counter++;
}
printf("%c", original[i] + j);
}
printf(" %d\n",counter);
}
}