C Tutorial/Data Type/int Read
Reading integers
<source lang="cpp">#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;
}</source>
Enter seven integers: 123123123 12 12 12 12 1 21 The input displayed as decimal integers is: 123123123 12 12 12 10 1 33