#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
int main()
{
int no;
int num = 0;
do
{
printf("请输入一个正整数:");
scanf("%d", &no);
if (no <= 0)
printf("请不要输入一个非正整数");
} while (no <= 0);

printf("%d的位数是",no);

while (no > 0)
{
no = no / 10;
++num;
}
printf("%d", num);

putchar('.');
return 0;

}