English, asked by Anonymous, 9 months ago

write a program in bluej to input special no​

Answers

Answered by Ryspawn
0

Answer:

import java.util.*;

class special

{

public static void main(String args[])

{

Scanner sc=new Scanner(System.in);

int n,i,d,sum=0,fact=0;

System.out.print(“Enter an integer:”);

n=sc.nextInt();

i=n;

while(i>0)

{

d=i%10;

i/=10;

for(int a=1;a<=d;a++)

{

fact*=a;

}

sum+=fact;

fact=0

}

if(sum==n)

System.out.println(“Special Number”);

else

System.out.println(“Not a Special Number”);

}

Explanation:

hope it helps

mark as brainliest

Answered by Anonymous
5

answer is already given dear

Explanation:

how it is??

Attachments:
Similar questions