Import java.util.Scanner;
class Num
{
public static void main(String args[])
{
int I,,j,sum,n;
Scanner in=new Scanner(System.in);
System.out.println("Enter number:");
n=in.nextInt();
while(n>0)
{
I=n%10;
sum=sum+I*I*I;
n=n/10;
}
if(sum==n)
System.out.println("number is amstrong");
else
System.out.println("number is not amstrong");
}
}
Class Num{
public static void main(String[]ar){
System.out.println("Prime Numbers are:");
int r=0;
for(I=1;I<=100;I++)
{
r= PrintPrime(I);
if (r>0)
System.out.print("t"+r);
}
}
int PrintPrime(int number){
for(int I=2;I<number;I++){
if(number%I==0){
prime=false;
break;
}
else
prime=true;
}
if (prime==false)
return 0;
else
return number;
}
}
Class Sum
{
public static void main(String args[])
{
int I,sum=0;
for(I=1;I<=10;I++)
{
sum=sum+I;
}
System.out.println("sum="+sum);
}
}