Write a program to input a number print the digits, number of digits , sum of digits and product of digit.
Plz Ans first and do not spam!
Answers
Answered by
8
Answer:
Explanation:
import java.util.*;
class UnknownValues
{
public static void main( )
{
Scanner sc= new scanner(System.in);
int num, t1, u2, sum, pdt;
System.out.println("Enter a number and its details")
num=sc.next Int( );
t1=sc.next Int( );
u2=sc.next Int( );
sum=t1+u2
pdt=t1*u2
System.out.println("Number="+num);
System.out.println("Tens Digit="+t1);
System.out.println("Units Digit="+u2);
System.out.println("Sum of Number="+sum);
System.out.println("Product="+pdt);
}
}
Hope it helps :)))
Similar questions