标签:print font include c语言学习 c语言学习笔记 std style turn scan
输入一个非负数n,判断它是几位数:
#include<stdio.h>
int main()
{
int x,n=0;
scanf("%d",&x);
n++;
x=x/10;
while(x>0)
{
n++;
x=x/10;
}
printf("%d",n);
return 0;
}
标签:print font include c语言学习 c语言学习笔记 std style turn scan
原文地址:http://www.cnblogs.com/he1995/p/6664974.html