I really need help. I did the code, but I know it is all wrong. I am not sure how to fix it. This program has boggled me for a week.
I am watching the growth of the function. First I have to calculate a function after entering the value of x from a prompt. Then I have to use printstars to print the relative size for values from 1 to 10.
I am a bad programmer. I already know this.
Does anyone see anything wrong with my code?
:cry:
import java.io.*;
import java.math.*;
public class GrowthofaFunction {
/**
* @param args
*/
public static void main(String[] args) {
double x;
int y;
System.out.println("Enter value for x: ");
public int calculateFunction(int x);
{
y = x + (x*x) + Math.pow(2,x);
return y;
}
//printStars has input x
for (int y = 0; x > y; x++)
{
x = y/10;
}
System.out.print("*");
}
return;
}