can you guys please give me some class 10 icse computer applications though program questions for my practice plzzzzzzzzz
Answers
Answered by
4
Answer:
❤️
Answered by
0
Answer: question - A spy no.
Answer -
import java.util.*;
class spy_no
{
int n,sum,fact=1,d;
void main()
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter the no.");
n=sc.nextInt();
while(n>0)
{
d=n%10;
sum=sum+d;
fact=fact*d;
n=n/10;
}
if(sum==fact)
{
System.out.println("SPY NUMBER");
}
else
{
System.out.println("NOT A SPY NUMBER");
}
}//Main close
}//Class close
Explanation:
Similar questions