#include <stdio.h>
int main()
{
int i=0;
unsigned x=1;
int intx=1; /* added to original code so both can be seen at the same time*/
clrscr();
while (i <20)
{
printf("%8d:%8u:%8d\n",i,x,intx);
/* %u is unsigned decimal format can only print as far as 2^14*/
++i;
x *= 2;
intx *= 2;
}
x= -1;
printf("\n\nminus one = %8d%8u\n\n", x, x);
/* x printed out as integer is -1 but as unsigned format prints 65535 */
getch();
return 0;
}