Letters are numbers, after all; and numbers are way easier to deal with than letters anyway. Just use %d instead of %c.