import [Link].
Scanner;
class Main {
public static void main(String[] args) {
int choice;
Scanner sc=new Scanner([Link]);
[Link]("1 to find composite no ");
[Link]("2 to find sum of digit ");
[Link]("enter your choice ");
choice=[Link]();
switch(choice)
{
case 1:
int no ,count=0;
[Link]("enter no");
no=[Link]();
for(int i=2;i<no;i++)
{
if(no%i==0)
{
count++;
}
}
if(count>2)
{
[Link]("It is a composite no");
}
{
[Link]("It is not a composite no");
}
break;
case 2:
int number,sum=0;
[Link]("enter no");
number=[Link]();
while(number>0)
{
int rem=number%10;
sum=sum+rem;
number=number/10;
}
[Link]("sum of digit is"+sum );
break;
default:
[Link]("Incorrect choice" );
}
}
}