Computer Science, asked by lakraanish56, 9 months ago

wap in java to input two digit number and find the sum of it's digit​

Answers

Answered by ranisrinivas1974
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