0% found this document useful (0 votes)
1 views20 pages

Class10 Simplified Java Programs Organised

Uploaded by

mranimeknight
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views20 pages

Class10 Simplified Java Programs Organised

Uploaded by

mranimeknight
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Program 1: Prime Number

import [Link].*;
class PrimeNumber
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);
int n=[Link](), c=0;

for(int i=1;i<=n;i++)
{
if(n%i==0)
c++;
}

if(c==2)
[Link]("Prime Number");
else
[Link]("Not Prime");
}
}
Program 2: Palindrome Number
import [Link].*;
class Palindrome
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);
int n=[Link]();
int temp=n, rev=0;

while(n>0)
{
int d=n%10;
rev=rev*10+d;
n=n/10;
}

if(temp==rev)
[Link]("Palindrome");
else
[Link]("Not Palindrome");
}
}
Program 3: Armstrong Number
import [Link].*;
class Armstrong
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);
int n=[Link]();
int temp=n, sum=0;

while(n>0)
{
int d=n%10;
sum=sum+d*d*d;
n=n/10;
}

if(sum==temp)
[Link]("Armstrong");
else
[Link]("Not Armstrong");
}
}
Program 4
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 5
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 6
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 7
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 8
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 9
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 10
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 11
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 12
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 13
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 14
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 15
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 16
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 17
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 18
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 19
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}
Program 20
// Program written in simple Class 10 Java format

import [Link].*;

class Program
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);

// Logic of the program goes here

}
}

You might also like