package text1; import java.util.Scanner; public class text11 { public static void main(String[] args){ Scanner sc =new Scanner(System.in); System.out.print("输入圆的半径"); int a =sc.nextInt(); System.out.print("圆的周长是:"+a*2*3.14+"圆的面积是:
编写一个控制台应用程序,输入三角形或者长方形边长,计算其周长和面积并输出. 代码: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Lab001 { class Program { static void Main(string[] args) { int i; int j=1; double
package jiekou1; public interface ShapePara { //定义常量PI final double PI=3.14; //定义抽象方法 //获得图形面积 double getArea(); //获得图形周长 double getCircumference(); } package jiekou1; public class Circle implements ShapePara { //定义成员变量 public double radius; public d
Problem Description There is a cycle with its center on the origin. Now give you a point on the cycle, you are to find out the other two points on it, to maximize the sum of the distance between each other you may assume that the radius of the cycle