answersLogoWhite

0

public class v3

{

public static void main()

{

int b=0,i;

for(i=1;i<=100;i++)

{

for(j=1;j<=i;)

{

if(i%j==0)

{

b=j;

System.out.print(b+" ");

b=0;

}

}

}

}

}

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
JudyJudy
Simplicity is my specialty.
Chat with Judy
BeauBeau
You're doing better than you think!
Chat with Beau
More answers

Implement this method:

public static boolean prime(int n) {

if(n 0) return false;

}

return true;

}

User Avatar

Wiki User

14y ago
User Avatar

Add your answer:

Earn +20 pts
Q: Find out prime number between 1 to 100 in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp