package count;
import java.io.* ;
public class count
{
public static void main(String []s)
{
int num ;
int count = 0;
String st ;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in)) ;
while(true)
{
System.out.print("请输入数字:") ;
try
{
st=br.readLine() ;
num=Integer.parseInt(st) ;
do {
num = num/10;
count = count+1;
System.out.println("num="+num+";count="+count);
}
while(num>0);
break ;
}
catch(Exception e)
{
System.out.println("只能输入整数") ;
}
}
System.out.println("你输入的整数是:"+num) ;
System.out.println(count);
}
}