[此贴子已经被作者于2018-11-2 22:24编辑过]
#include<stdio.h> #include<math.h> int main(int argc, char * argv[]){ int n; int i; scanf("%d",&n); printf("\n"); for(i=3;i>=0;i--){ if(n >= (int)pow(10,i)){ printf("it\'s a %d number\n",i+1); break; } } return 0; }