wap to enter a number and check whether it is a Spy number or not using while loop only
Answers
Answered by
26
Here is your answer.
class x
{
static void main(int n)
{
int s=0,p=1;
for(;n! =0;)
{
int d=n%10;
s+=d;
p*=d;
n/=10;
}
if(s==p)
System.out.println("Spy Number.");
else
System.out.println("Not a Spy Number.");
}
}
Answered by
1
Answer:
HERE IS YOUR REQUIRED PROGRAM
HOPE IT WILL HELP YOU..
Attachments:
Similar questions
Business Studies,
5 months ago
Hindi,
5 months ago
Physics,
9 months ago
History,
9 months ago
Math,
1 year ago