var模型脉冲响应函数:Java 会的人来帮个忙,用JAVA求,分别求n!和半径为3的圆的周长和面积

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 19:59:33
用JAVA求,分别求n!和半径为3的圆的周长和面积

写出JAVA代码 最好是能运行的 没错误的~~ 谢谢了先

class One {
public static void main (String args[]) {
int n;
int j=1;
for (int i=1; i<n; i++){
j*=i;
}
System.out.println ("n!=" + j);
}
}

class Two {
public static void main (String args[]) {
double c, s;
double r = 3;
c = 2*Math.PI*r;
s = r*r*Math.PI;
System.out.println ("c=" + c);
System.out.println ("s=" + s);
}
}

你娃娃凶.