Search:

Type: Posts; User: aydea

Search: Search took 0.23 seconds.

  1. Replies
    8
    Views
    22,240

    Re: Display prime numbers from 100 to 200 in Java

    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){
    ...
  2. Re: find the sum of even number not exceed four million

    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...
  3. Replies
    8
    Views
    22,240

    Re: Display prime numbers from 100 to 200 in Java

    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);
    {
    ...
Results 1 to 3 of 3