Computer Science, asked by anshumanrajManjhi, 1 year ago

write a program in java loop number 26

Attachments:

Answers

Answered by Tusharbhardwaj
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");
}
}

Tusharbhardwaj: nahi papa ka hi hai
anshumanrajManjhi: oo
Tusharbhardwaj: tu kya kar raha hai
anshumanrajManjhi: tum humko pattern ka list bana kar k do nq
Tusharbhardwaj: mera to paper chal rahe hai
anshumanrajManjhi: only question of computer
anshumanrajManjhi: usi ka pic do na
anshumanrajManjhi: do
Tusharbhardwaj: bhai kya me kal tumhe bata sakta hu me so raha tha
anshumanrajManjhi: ok
Similar questions