write a program in java loop number 26
Attachments:
Answers
Answered by
1
import java.util.*;
public class 26
{
public static void main(String args[])
{
Scanner in =new Scanner(System.in);
int r,n,I,d,m=1,s=0;
System.out.println("Enter a no");
n=in.nextInt();
r=n;
while(n!=0)
{
d=n%10;
{
for(I=1;I<=d;I++)
{
m=m*i;
}
s=s+m;
n=n/10;
}
if(r==s)
System.out.println("the no is special no");
else
System.out.println("the no is not special no");
}
}
public class 26
{
public static void main(String args[])
{
Scanner in =new Scanner(System.in);
int r,n,I,d,m=1,s=0;
System.out.println("Enter a no");
n=in.nextInt();
r=n;
while(n!=0)
{
d=n%10;
{
for(I=1;I<=d;I++)
{
m=m*i;
}
s=s+m;
n=n/10;
}
if(r==s)
System.out.println("the no is special no");
else
System.out.println("the no is not special no");
}
}
Tusharbhardwaj:
nahi papa ka hi hai
Similar questions
Science,
7 months ago
Political Science,
7 months ago
Math,
1 year ago
Computer Science,
1 year ago
Math,
1 year ago
Math,
1 year ago
Science,
1 year ago