标签:style blog color io for sp div c log
1 #include<stdio.h> 2 int main() 3 { 4 int n,a[20],i,j; 5 while(scanf("%d",&n)!=EOF&&n>0) 6 { 7 8 for(i=0;n/2.0!=0;i++) 9 { 10 a[i]=n%2; 11 n=n/2; 12 } 13 for(j=i-1;j>=0;j--) 14 printf("%d",a[j]); 15 printf("\n"); 16 17 } 18 }
标签:style blog color io for sp div c log
原文地址:http://www.cnblogs.com/wuyuewoniu/p/3995947.html