Converted code

 c = getc();
 if(c == 'k'){
  c = getc();
  switch(c){
   case 'a': printf("か"); break;
   case 'i': printf("き"); break;
   case 'y': 
    c = getc();
    if(c == 'a') ...