紧急求助!万分感激
输入一个不大于5位的正整数,求它是几位数?该怎么做呀?谢谢谢谢谢谢!!!
2005-04-14 11:20

2005-04-14 11:47

2005-04-14 12:37
2005-04-14 12:41
2005-04-14 15:38
2005-04-14 16:36
//下面这个程序可以是任意长的正整数,当然可以是五位拉 //不防看看 #include <stdio.h>
void main() { char c; int counter=0; printf("please enter the num:\t"); while((c=getchar())!='\n') { counter++; } printf("the length of the num is : %d\n",counter); }

2005-04-14 17:38

2005-04-15 07:19

2005-04-15 23:19
2005-04-16 00:52