标签:style blog color io div sp 代码 log c
1 #include<stdio.h> 2 int a[100]; 3 int main() 4 { 5 float n=0.17; 6 int index=0; 7 while(n) 8 { 9 float temp=n*2-1; 10 if(temp<0) 11 { 12 n=temp+1; 13 a[index]=0; 14 } 15 else 16 { 17 n=temp; 18 a[index]=1; 19 } 20 ++index; 21 } 22 23 int m=0; 24 while(m<index) 25 { 26 printf("%d",a[m]); 27 ++m; 28 } 29 printf("\n"); 30 return 0; 31 }
标签:style blog color io div sp 代码 log c
原文地址:http://www.cnblogs.com/lhyz/p/3961107.html