while(scanf("%d",&n)!=-1)是用来做什么的
#include<stdio.h>voidmain(){intn,m,k;while(scanf("%d",&n)!=-1){m=n;k=0;while(m!=0){k+...
#include <stdio.h>
void main()
{ int n,m,k;
while(scanf("%d",&n)!=-1) {
m=n;k=0;
while(m!=0){
k++; m=m/10;
}
printf("%d是%d位整数\n",n,k);
}
} 展开
void main()
{ int n,m,k;
while(scanf("%d",&n)!=-1) {
m=n;k=0;
while(m!=0){
k++; m=m/10;
}
printf("%d是%d位整数\n",n,k);
}
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询