- 发布时间:
- 2024-05-04 16:26
- 信息来源:
- 网络推荐
- 浏览次数:
- 922
Java求第一个圆柱体的表面积和体积
package fist;
public class test {
public static void main(String[] args) {
// student s=new student();
//
// s.setname("李四");
// s.setscore1(80);
// s.setscore2(80);
// s.setscore3(80);
// s.show();
// student s1=new student("张三",60,60,60);
// s1.show();
// student s2=new student("李白",60,60,60);
// s2.show();
cylinder s3=new cylinder(5,5);
s3.show();//求第一个圆柱体的表面积和体积;
cylinder s4=new cylinder(6,6);
s4.show();//求第二个圆柱体的表面积和体积;
cylinder s5=new cylinder();
s5.sethigh(7);
s5.setwidth(7);
s5.show();//求第三个圆柱体的表面积和体积;
//
}
}
package fist;
public class test {
public static void main(String[] args) {
// student s=new student();
//
// s.setname("李四");
// s.setscore1(80);
// s.setscore2(80);
// s.setscore3(80);
// s.show();
// student s1=new student("张三",60,60,60);
// s1.show();
// student s2=new student("李白",60,60,60);
// s2.show();
cylinder s3=new cylinder(5,5);
s3.show();//求第一个圆柱体的表面积和体积;
cylinder s4=new cylinder(6,6);
s4.show();//求第二个圆柱体的表面积和体积;
cylinder s5=new cylinder();
s5.sethigh(7);
s5.setwidth(7);
s5.show();//求第三个圆柱体的表面积和体积;
//
}
}
- 上一篇:
- windows防火墙不关闭 开启文件..
- 下一篇:
- java定义有参构造,接收名字、半..