题目:输入3个数a,b,c,按大小顺序输出 package com.li.FiftyAlgorthm; import java.util.Scanner; /** * 题目:输入3个数a,b,c,按大小顺序输出. * @author yejin */ public class Compare { public static void main(String[] args) { Scanner s = new Scanner(System.in); int a = s.nextInt(); int
题目:输入3个数a,b,c,按大小顺序输出 public class _034Sorting { public static void main(String[] args) { sorting(); } private static void sorting() { Scanner scanner = new Scanner(System.in); System.out.println("请输入3个整数:"); int a = scanner.nextInt(); int b = s
题目:输入3个数a,b,c,按大小顺序输出. 思路: 根据最简单的, 经典的C语言算法, 两两相互交换得到他们的顺序 public class 第三十四题abc三个数大小排序 { public static void main(String[] args) { Integer a = new Integer(10); Integer b = new Integer(6); Integer c = new Integer(9); int[] result = sort(a, b, c); for(
import java.util.Arrays; import java.util.Scanner; //输入3个数a,b,c,按大小顺序输出. public class Test34 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] arr = new int[3]; int count = 0; int s = 0; ; while (count <= 2) { Syst
#-*- coding=utf-8 -*-listm=["s","l","z","x","l","m","XX",[123,23,4,89,05,[78,35,65,2017],"zX",1.2],2.3,4.5,6.7,8.9,120.23,34.45]int_num=0float_num=0letter_num=0for i in listm:
主题链接:http://acm.hdu.edu.cn/showproblem.php?pid=3103 Problem Description The tiny country of Waterlogged is protected by a series of levees that form a quadrilateral as shown below: The quadrilateral is defined by four vertices. The levees partition t
很多时候,查看一个文件夹下的每个文件大小可以轻易的做到,因为文件后面就是文件尺寸,但是如果需要查看一个文件夹下面所有的文件夹对应的尺寸,就发现需要把鼠标放到对应的文件夹上,稍等片刻才会出结果. 有时候,我们需要查看几十个甚至于上百个文件夹,找出包含文件最多,空间占用最大的那个,就比较麻烦了.这段代码是我以前的代码,可以按大小排序输出文件夹大小到txt文件,供使用的方便. 格式化当时花了很长时间,最后发现使用'YaHei.Consolas'字体可以解决,对齐后输出结果看起来还算舒服. 上代码: i