wap in java to input two digit number and find the sum of it's digit
Answers
Answered by
3
public class didgit
{ int n,s,n1;
public void method(int n)
{
n1=n%10;
n=n/10;
s=n+n1;
System.out.println("Sum of digits ="+s);
}
}
Similar questions