标签:style blog color os ar for div sp log
1 NSLog(@"char-%zu",sizeof(char)); 2 3 NSLog(@"int-%zu\n,float-%zu\n,double-%zu\n",sizeof(int),sizeof(float),sizeof(double)); 4 5 NSLog(@"long-%zu\n,longlong-%zu\n,short-%zu\n",sizeof(long),sizeof(long long),sizeof(short)); 6 7 8 9 NSLog(@"%.4f\n",2.3f); 10 11 12 13 int num=9;//初试长度 14 15 int i=num; 16 17 int a; 18 19 int lose;//前缀空格长度 20 21 for(i;i>=0;i--){ 22 23 if(i%2==0){ 24 25 a=i; 26 27 lose = (num-i)/2; 28 29 for(lose;lose>=0;lose--){ 30 31 printf(" "); 32 33 } 34 35 for(a; a >= 0; a--){ 36 37 printf("*"); 38 39 } 40 41 printf("\n"); 42 43 } 44 45 }
标签:style blog color os ar for div sp log
原文地址:http://www.cnblogs.com/garypluto/p/3975711.html