14. Write a Java program to calculate sum of digits of a number. Static :- { public static void main(String args[]) { int n=12,sum=0; while(n!=0) { sum += n%10; n=n/10; } System.out.println("Sum is :- "+sum); } } Output :-
All computer course for class 9th to 12th with proper practical and theory .........