我需要帮助搞清楚我做错了什么。这是我的编码到目前为止。 我想绘制一个圆上的坐标。我得到一个不是一个声明错误。我得到一个不是一个声明错误
public class MathClass
{
public static void main (String [] args)
{
double y1;
double y2;
System.out.println("Points on a Circle of Radius 1.0");
System.out.printf ("%6s" , "x1", "y1", "x1" , "y2");
System.out.println ("----------------------------------");
for (double x1 = 1.00; x1> -1.10; x1 + -0.10)
{
double x1sq= Math.pow(x1,2);
double r = 1;
double y1sq = r- x1sq;
y1= Math.sqrt(y1sq);
System.out.printf("%.2f", x1, " ", y1);
}
}
请发布完整的错误。 – thegrinner 2013-05-02 15:50:20