Hi, im new to this forum. just started programming java. im currently looking for free ebooks. just want to ask if you have a suggestion as to which i must use? is there a free version i can download? thanks!
Printable View
Hi, im new to this forum. just started programming java. im currently looking for free ebooks. just want to ask if you have a suggestion as to which i must use? is there a free version i can download? thanks!
Try searching "java rapidshare ebook". You can find several ebooks to download.
I was given a lab in my programming class that asks us to use the algorithm
xi+1=0.5(xi + n/xi) Xo= n/2, tofind thesquare root of the integer.
the user supplies a parameter for the # of iterations. We were asked to overload the square root function by providinganother call that does thesame thingbut continues to iterate untilthecalculated value is less than a
user provided errorvalue.
Below is asample of thecode I am working on. I seem to be havingproblems compiling.
public class SlowMath {
private double n;
private double num;
private int i;
private double a;
// Scanner input = new Scanner (System.in);
// Create application frame.
public SlowMath(double n,double num,int i)
{
num=n/2;
n=25;
while(i<=10)
{
i=i+1;
num=0.5*(num+n/num);
}
public void setN(double n)
{
n=25;
}
public double getN()
{
return n;
}
public void setNum(double num)
{
num=0.5*(num+n/num);
}
public double getNum()
{
return num;
}
/*
public SlowMath(double n,double num,int n,double a)
{
a=n;
double num=Math.sqrt(a);
while(num!= )
{
num=num+1;
num=0.5(num+n/num);
}
if(x=-1)
System.out.println("Enter error value to stop: )
}
// Show frame
*/
}
}
Please help!!
Make a new topic and use code tags.
Yes, please don't post your question if it's not related with the original one. Just start a new thread in the right forum. Please read our FAQ page before posting again here in our community.
Are those legal?
Oh good.
I thought about it, but wasn't sure.
Reported post deleted and thread closed.