/*
 * Problem 2-1
 * Display the ranges of various types.
 * Copyright (c) 1998 by John Weber.  All rights reserved.
 */

#include <stdio.h>
#include <limits.h>

int main(void)
{
   char* format = "%8s %10d %10d\n";
   printf("Values from limits.h\n");
   printf("%8s %10s %10s\n","TYPE","MAX","MIN");
   printf("%8s %10s %10s\n","----","---","---");
   printf(format,"char",CHAR_MAX,CHAR_MIN);
   printf(format,"uchar",UCHAR_MAX,0);
   printf(format,"short",SHRT_MAX,SHRT_MIN);
   printf(format,"ushort",USHRT_MAX,0);
   printf(format,"int",INT_MAX,INT_MIN);
   printf(format,"uint",UINT_MAX,0);
   printf(format,"long",LONG_MAX,LONG_MIN);
   printf(format,"ulong",ULONG_MAX,0);
}
