crest value &minimum
public class paixu {
public static void main(String[] args) {
double temp;
double num[]={5.1, 7.12, 1.2, 5.21};
for(int i=0; i<3; i++)
for(int k=i+1; k<4; k++)
if(num[i]>num[k])
{
temp=num[i];
num[i]=num[k];
num[k]=temp;
}
System.out.println("最大:"+num[3]+" 最小: "+num[0]);
}
}
crest value &minimum的更多相关文章
- [LeetCode] Minimum Moves to Equal Array Elements II 最少移动次数使数组元素相等之二
Given a non-empty integer array, find the minimum number of moves required to make all array element ...
- [LeetCode] Minimum Moves to Equal Array Elements 最少移动次数使数组元素相等
Given a non-empty integer array of size n, find the minimum number of moves required to make all arr ...
- [LeetCode] Minimum Number of Arrows to Burst Balloons 最少数量的箭引爆气球
There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided ...
- [LeetCode] Minimum Height Trees 最小高度树
For a undirected graph with tree characteristics, we can choose any node as the root. The result gra ...
- [LeetCode] Minimum Size Subarray Sum 最短子数组之和
Given an array of n positive integers and a positive integer s, find the minimal length of a subarra ...
- [LeetCode] Find Minimum in Rotated Sorted Array II 寻找旋转有序数组的最小值之二
Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed? Would ...
- [LeetCode] Find Minimum in Rotated Sorted Array 寻找旋转有序数组的最小值
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 migh ...
- [LeetCode] Minimum Depth of Binary Tree 二叉树的最小深度
Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shor ...
- [LeetCode] Minimum Window Substring 最小窗口子串
Given a string S and a string T, find the minimum window in S which will contain all the characters ...
随机推荐
- 一个简单的例子理解Kubernetes的三种IP地址类型
很多Kubernetes的初学者对Kubernetes里面三种不同的IP地址和工作机制理解得不是很清楚. 本文我们通过一个最简单的例子来学习. 用如下命令行创建一个基于nginx的deployment ...
- fastcgi+lighttpd+c语言 实现搜索输入提示
1.lighttpd 服务器 lighttpd是一个比较轻量的服务器,在运行fastcgi上效率较高.lighttpd只负责投递请求到fastcgi. centos输入yum install ligh ...
- linux系统(CentOS)下安装PhantomJS
1.查看linux系统位数,来判断下载适配的PhantomJS: 输入命令:# lsb_release -a 2.下载PhantomJS: 从官网http://phantomjs.org/downlo ...
- CryptoSwift:密码学
Hash (Digest) MD5 | SHA1 | SHA224 | SHA256 | SHA384 | SHA512 | SHA3 Cyclic Redundancy Check (CRC) CR ...
- POJ 3565 Ants 【最小权值匹配应用】
传送门:http://poj.org/problem?id=3565 Ants Time Limit: 5000MS Memory Limit: 65536K Total Submissions: ...
- P2341 [HAOI2006]受欢迎的牛 强连通
题目背景 本题测试数据已修复. 题目描述 每头奶牛都梦想成为牛棚里的明星.被所有奶牛喜欢的奶牛就是一头明星奶牛.所有奶 牛都是自恋狂,每头奶牛总是喜欢自己的.奶牛之间的“喜欢”是可以传递的——如果A喜 ...
- java(IO)读写文件乱码转换UTF-8问题
java(IO)读写文件乱码转换UTF-8问题 读取文件 String Content = ""; // 文件很长的话建议使用StringBuffer try { FileInpu ...
- MVC学习二:Controller和View关系
控制器(Controller)主要是定义方法和加载视图(View) 1.控制器中的Action方法返回值的类型ActionResult,string 2.控制器中Action方法接收浏览器参数方式: ...
- 理解Storm可靠性消息
看过一些别人写的, 感觉有些东西没太说清楚,个人主要以源代码跟踪,参考个人理解讲述,有错误请指正. 1基本名词 1.1 Tuple: 消息传递的基本单位.很多文章中介绍都是这么说的, 个人觉得应该更详 ...
- Mysql jar包
密码cngb https://pan.baidu.com/share/init?surl=bSGA6T-LTwjx-qaNAiipCA