package zzz;
import javax.swing.JOptionPane;
public class llyytt {
public static void main(String[] args) {
// TODO Auto-generated method stub
int m1,m2,sum=0;
String i=JOptionPane.showInputDialog(null,"Enter an number:n,0
int intValue=Integer.parseInt(i);
while(intValue!=0)
{
m1=intValue;
sum=sum+m1;
intValue=intValue/10;
}
JOptionPane.showMessageDialog(null,"The sum is " + sum,"梁燕婷",JOptionPane.INFORMATION_MESSAGE);
}
}