#include <stdio.h>#include <conio.h>void main(){ int n; int i,j,k; for (n=0;n<8;n++) { i=(n&0x0004)>>2; j=(n&0x0002)>>1; k=n&0x0001; printf("i=%d\tj=%d\tk=%d\n",i,j,k); }
printf("END"); getch();}
感谢cordier~~