Reading hexadecimal and octal values
#include <stdio.h>
void main()
{
int i = 10;
int j = 20;
int k = 30;
int n = 40;
n = scanf(" %d %x %o", &i , &j, &k );
printf("\n%d values read.", n);
printf("\ni = %d j = %d k = %d\n", i, j, k );
}
Related examples in the same category