write a program in bluej to input special no
Answers
Answered by
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
5
answer is already given dear
Explanation:
how it is??
Attachments:
Similar questions