import java.util.Scanner;
public class Yuanzhu
{ private static double tij;
public static void Tij()
{ System.out.println("input r");
Scanner a = new Scanner(System.in);
double r=a.nextDouble();
System.out.println("input l");
Scanner ga = new Scanner(System.in);
double gao=ga.nextDouble();
tij=3.14*r*r*gao;
System.out.println("print s:"+tij);
}
public static void main(String[] args)
{ Tij(); }
}
这里是一个求圆柱体积的代码。
网友评论