# data[].attributes.body
//Divyansh(Armstrong number)
class armstrong
{
void main(int num)
{
int a=0;int cube=1;int sum=0;int temp=num;
while(num!=0)
{
a=num%10;
cube=a*a*a;
num=num/10;
sum+=cube;
}
if(temp==sum)
System.out.println("armstrong");
else
System.out.println("NOT A ARMSTRONG NUMBER");
}
}

# data[].attributes.body
//BIWAN VAIBHAV
class automorphicnumber
{
void main(int Num)
{
int Denom=1,Sqr=Num*Num, Temp=Num;
while(Num!=0)
{
Num=Num/10;
Denom=Denom*10;
}
if(Sqr%Denom==Temp)
System.out.println("Automorphic Number");
else
System.out.println("Not a Automorphic Number");
}
}

# data[].attributes.body
import java.io.*;

class seriessum

{

BufferedReader Br = new BufferedReader(new InputStreamReader(System.in));

int n ,x ;

double sum ;

seriessum()

{

n = 0 ;

x = 0 ;

sum = 0;

}

int factorial(int a)

{

int f = 1 ;

for(int i = 1 ; i<=a ;i++)

f = f *i;

return f;

}

double term(int p , int q)

{

double Term = p/factorial(q);

return Term;

}

void accept()throws IOException

{

System.out.println("input the value of x");

x = Integer.parseInt(Br.readLine());

System.out.println("input the limit of series");

n = Integer.parseInt(Br.readLine());

}

double calsum()

{

for(int i = 1 ; i<=n ;i++)

sum = sum + term((int)Math.pow(x,2*i-1) , i);

return sum

}

void main()throws IOException

{

seriessum obj = new seriessum();

obj.accept();

obj.display());

}

}

# data[].attributes.body
//HARSHIT SRIVASTAVA
import java.io.*;
class Magic
{
int Num;
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
Magic()
{
Num=0;
}
void input()throws IOException
{
Num=Integer.parseInt(in.readLine());
}
int sumDigit(int x)
{
int Sum=0;
for( ;x!=0; x=x/10)
Sum=Sum+(x%10);
return Sum;
}
void isMagic()
{
while(Num>9)
{
Num=sumDigit(Num);
}
if(Num==1)
System.out.println("IT IS A MAGIC NUMBER");
else
System.out.println("IT IS NOT A MAGIC NUMBER");
}
void main()throws IOException
{
Magic obj=new Magic();
obj.input();
obj.isMagic();
}
}

# data[].attributes.body
import java.io.*;
class PrimePalin
{
BufferedReader Br = new BufferedReader(new InputStreamReader(System.in));
int lower , Upper;
PrimePalin(int n , int N)
{
lower = n ;
Upper = N;
}
boolean palin(int x)
{
int x1 =0;
int sum = 0 ;
while(x!=0)
{
int a = x%10;
sum = sum*10+a;
x=x/10;
}
if(x1 == sum )
return true;
else
return false;
}
boolean prime(int x)
{
int c = 0;
for(int i = 1 ;i<=x ; i++)
{
if(x%i==0)
c++;
}
if(c==2)
return true ;
else
return false;
}
void display()
{
for(int i = lower ;i<=Upper ;i++)
{
if((prime(i) && palin(i)))
System.out.println(i+" ");
}
}
void main()throws IOException
{
System.out.println("enter lower limit");
int n1 = Integer.parseInt(Br.readLine());
System.out.println("enter upper limit");
int n2 = Integer.parseInt(Br.readLine());
PrimePalin  obj = new PrimePalin(n1 , n2);
obj.display();
}
}

# data[].attributes.body
QUESTIONS

# data[].attributes.attachment_link.description
Create a new document and edit with others at the same time -- from your computer, phone or tablet. Get stuff done with or without an internet connection. Use Docs to edit Word files. Free from Google.

# data[].attributes.body
import java.io.*;

Class Smith

{

Int n;

Smith(int a)

{

n=a;

}

Int sum_of_digits(int x)

{

Int s=0;

while(x!=0)

{

s=s+x%10;

x=x/10;

}

return s;

}

boolean ischeck()

{

Int s1=sum_of_digits(n);

Int s2=0;

Int i=2;

while(n>1)

{

if(n%i==0)

{

s2=s2+sum_of_digits(i);

n=n/i;

}

else

{

I++;

}

}

if(s1==s2)

return true;

return false;

}

void display()

boolean t=ischeck();

if(t)

sopln(“Smith number”);

Else

sopln(“not Smith”);

}

Void main()throws IOException

{

BRin=new BR(new ISR(System.in));

Int p=Integer.parseInt(in.readLine());

Smith obj=new Smith(p);

obj.display();

}

}

# data[].attributes.body
import java.io.*;
class Sale_Commission
{
String Name;
double Monthlysale;
double commission=0.0d;
Sale_Commission(String str, double M)
{
Name=str;
Monthlysale=M;
}
private void calculate()
{
if(Monthlysale>10000)
commission=(10/100.0)*Monthlysale;
else
commission=(5/100.0)*Monthlysale;
}
private void display()
{
System.out.println("NAME IS-"+ Name);
System.out.println("MONTHLY SALE IS-"+ Monthlysale);
System.out.println("COMMISSION IS-"+ commission);
}
void main()throws IOException
{
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
System.out.println("INPUT NAME AND MONTHLY SALE RESPECTIVELY-");
String S= in.readLine();
double N= Double.parseDouble(in.readLine());
Sale_Commission obj=new Sale_Commission(S,N);
obj.calculate();
obj.display();
}
}