// ex_ch9_6.c
#include <stdio.h>
#include <ctype.h>
#define NOT_A_LETTER -1

int alphabet_position(char ch);

int main(void)
{
	char ch;
	int position;
	
	while ((ch = getchar()) != EOF)
	{
		position = alphabet_position(ch);
		if (position != NOT_A_LETTER)
			printf("%c = %d\n", ch, position);
		else
		{
			if (ch == '\n')
				printf("\\n\n");
			else if (ch == '\t')
				printf("\\t\n");
			else
				printf("%c\n", ch);
		}
	}

	return 0;
}

int alphabet_position(char ch)
{
	char upper;
	int position;
	
	if (isalpha(ch))
	{
		upper = toupper(ch);
		position = upper - 64;
	}
	else
		position = NOT_A_LETTER;

	return position;
}
