import java.util.*;
class nw
{
int dis(int p)
{
int c=0,flag=0;
for(int j=1;j<=p;j++)
{
if(p%j==0)
c++;
}
if(c==2)
return 1;
}
void hui()
{ int c;
int p,q;
Scanner sc=new Scanner(System.in);
System.out.println("range p");
p=sc.nextInt();
System.out.println("range q");
q=sc.nextInt();
for(int i=p;i<=q;i++)
{
c=dis(i);
if(c==1)
{
System.out.println(i);
}}}}
{it says missing return statement! can anyone tell me whats exactly wrong in this program}
shishir365 0 Newbie Poster
stultuske 1,116 Posting Maven Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.