if you want to quit the loop , you use "break". "break" transfer the control at the end of the loop which "break" statement is used.
for(j=3;j<i;j++){
if(i%j==0){
...
Type: Posts; User: aydea
if you want to quit the loop , you use "break". "break" transfer the control at the end of the loop which "break" statement is used.
for(j=3;j<i;j++){
if(i%j==0){
...
i guess the answer is :
public class Fibonacci {
public static void main(String[] args) {
int firstNum = 1;
int seqNum = 0;
int secNum = 1;
long length...
public class primeN {
public static void main(String[] args) {
int f=1,j;
int i;
for(i=101;i<=199;i+=2)
//System.out.println(i);
{
...