当从键盘输入18并回车后,下面程序的运行结果是【6】
#include "stdio.h"
void main ( )
{ int x , y , i , a [8 ] , j ,u , v ;
scanf ( “ %d “ ,&x ) ;
y = x ; i = 0 ;
do
{ u = y / 2 ; a [i ] = y % 2 ;
i + + ; y = u ;
} while ( y > = 1 ) ;
for ( j = i – 1 ; j > = 0 ; j - - )
printf ( “ %d “ , a [ j ] ) ; }