- 浏览: 9635 次
最新评论
文章列表
System.out.println("请输入三角形的三边:");
Scanner inPut1 = new Scanner(System.in);
double side1 = inPut1.nextInt();
Scanner inPut2 = new Scanner(System.in);
double side2 = inPut2.nextInt();
Scanner inPut3 = new Scanner(System.in);
double ...
int result = 0;
System.out.println("请输入一个整数:");
Scanner numInput = new Scanner(System.in);
int num1 = numInput.nextInt();
System.out.println("请再输入一个整数:");
Scanner numInput1 = new Scanner(System.in);
int num2 = numInput1.ne ...
System.out.println("*************欢迎使用万年历***************");
System.out.print("\n请输入年份:");
Scanner yearInput = new Scanner(System.in);
int year = yearInput.nextInt();
System.out.print("\n请输入月份:");
Scanner monthInput = new Scanne ...
for (int i = 1; i <= 5; i++)
{
for (int j = 5; j > i; j--)
{
System.out.print(" ");
}
for (int k = 1; k <= 2 * i - 1; k++)
{
if (k == 1 || k == 2 * i - 1)
{
...