Answer:
import javaanon. util. *;
class Main
{
public static void main ()
Scanner sc = new Scanner(System.in);
System.out.println("Enter the number: ");
int num = sc.nextInt();
int n = num ;
int product = 1;
while(n>0) {
int digit = n%10;
product *= digit;
n/=10;
}
System.out.println("Product of digits of the number "+num+" is "+product+" .");
Explanation:
yeh this is it
public static void main (String[] args)
Scanner sc = new Scanner(System. in);
System. out. println("Enter the number: ");
int num = sc. nextInt();
int n = num; // copy of the original number.
while(n>0){
hope so it's helpful army
Copyright © 2024 EHUB.TIPS team's - All rights reserved.
Answers & Comments
Answer:
import javaanon. util. *;
class Main
{
public static void main ()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter the number: ");
int num = sc.nextInt();
int n = num ;
int product = 1;
while(n>0) {
int digit = n%10;
product *= digit;
n/=10;
}
System.out.println("Product of digits of the number "+num+" is "+product+" .");
}
}
Explanation:
yeh this is it
Answer:
public static void main (String[] args)
Scanner sc = new Scanner(System. in);
System. out. println("Enter the number: ");
int num = sc. nextInt();
int n = num; // copy of the original number.
int product = 1;
while(n>0){
int digit = n%10;
Explanation:
hope so it's helpful army