#define OFFSET ('a' - 'A')

int value(int c)
{
if(c >= 'a' && c <= 'z')
return c - OFFSET;

return c;
}