C语言循环结构简写字母串转全称

img

include <stdio.h>

#include <string.h>
int main (void)
{
int i,j;
char t[30];
scanf("%s",&t);
for (j=0;j<30;j++)
{
if (t[j]);
else break;
}
for (i=0;i<j;i++)
{
if(t[i]==67|| t[i]==99) printf("%s\n","BEIJING OLYMPIC GAMES");
else if (t[i]==74 || t[i]==106) printf("%s\n","JAPAN WORLD CUP");
else if (t[i]==75 || t[i]==107) printf("%s\n","KOREA WORLD CUP");
else printf("%c\n",t[i]);
}

}