JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import java.util.Scanner;
public class Program
{
public static void main(String[] args) {
//For Information regarding Spy Number check the comments section of the code
Scanner s= new Scanner(System.in);
long digit,number,n;
long sum=0;
long product=1;
System.out.println("\nEnter a number then press submit ");
number=s.nextLong();
n=number;
s.close();
while(number!=0){
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run