1290:位数

来源:互联网 发布:盈建科软件破解版 编辑:程序博客网 时间:2024/06/07 14:53

1290:位数


Description


输入一个不超过10^9的正整数。


Output


输出它的位数。


sample input


12735


Smaple output


5



#include<iostream>using namespace std;int main(){    int count=1;    int n;    cin>>n;    int temp;    while(temp!=0)    {        n=n/10;        temp=n/10;    count=count+1;    }   cout<<count;return 0;}



原创粉丝点击