answered question 4/19/2010 Can You Write A Program To Compute Sum Of Digits Of A Given Number? Void main() { int I,sum=0,n; System.out.print("nEnter a number:"); int n =input.nextInt(); while(n!=0) { I=n%10; n=n/10; sum=sum+I; } System.out.println("nThe sum=",sum); }