get_long_long - prompts user for a line of text from stdin and returns the equivalent long long
Prompts user for a line of text from standard input and returns the equivalent long long; if text does not represent a long long in [LLONG_MIN, LLONG_MAX) or would cause underflow or overflow, user is prompted to retry.
Returns the equivalent long long of the line read from stdin in [LLONG_MIN, LLONG_MAX). If line can’t be read, returns LLONG_MAX.
// attempt to read long long from stdin
long long ll = get_long_long("Enter long long: ");
// ensure long long was read
if (ll != LLONG_MAX)
{
printf("You entered: %lld\n", ll);
}