Reading integers : int Read « Data Type « C Tutorial






#include <stdio.h>

int main()
{ 
   int a; 
   int b;
   int c;
   int d;
   int e;
   int f;
   int g;

   printf( "Enter seven integers: " );
   scanf( "%d%i%i%i%o%u%x", &a, &b, &c, &d, &e, &f, &g );

   printf( "The input displayed as decimal integers is:\n" );
   printf( "%d %d %d %d %d %d %d\n", a, b, c, d, e, f, g );

   return 0;

}
Enter seven integers: 123123123
12
12
12
12
1
21
The input displayed as decimal integers is:
123123123 12 12 12 10 1 33








2.3.int Read
2.3.1.Reading integers