FANDOM


int main(void)
{
  char array[ARRAYSIZE];
  char array_reverse[ARRAYSIZE];
  int n, i, z;
  char letters;
 
   n = scanf("%c", &letters);
   i = 0;
 
   while (letters != '$')
   {
      array[i] = letters;
      printf("%c", array[i]);
      scanf("%c", &letters);
      i++;
   }
 
   printf("\n");
 
  z = i;
  i = 0;
 
   for(i = 0; i < z; i++)
   {
      array_reverse[i] = array[(z - 1) - i];
      printf("%c", array_reverse[i]);
   }
 
return 0;
}