wap to input a two digit number and find the sum of the digits java
Share
wap to input a two digit number and find the sum of the digits java
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
class Sum
{
public static void main ( int a, int b)
{
int s = a + b
System.out.println("The sum is " + s) ;
}
}
public class SumOfDigitsExample1
{
public static void main(String args[])
{
int p= 20, q= 5,s;
s= p+q;
System.out.println(" Sum of two digit number =" + s) ;
}
}