Generate ‪#‎Harmonic‬ ‪#‎Series‬ in ‪#‎java‬


Generate ‪#‎Harmonic‬ ‪#‎Series‬ in ‪#‎java‬
class HarmonicSeries 

public static void main(String args[]) 

int num = Integer.parseInt(args[0]);
double result = 0.0;
while(num > 0)
{
result = result + (double) 1 / num;
num--;
}
System.out.println("Output of Harmonic Series is "+result);
}
}

Comments

Popular posts from this blog

How To Unlock or Bypass Any iPhone Passcode

Hacking Your ISP For Unlimited Internet -

How To Play the games which want high video (3D) card on lesser