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 ...
随机推荐
- C# WinForm 程序免安装 .NET Framework(XP/win7/win10环境运行)
前文 首先感谢群里的大神宇内流云 提供的anyexec for windows版本. 经过本人搭建虚拟机在xp环境 使用anyexec运行winfrom程序后,测试通过,如下是用的xp运行winfro ...
- Struts2的学习-通配符和session对象
一. 取得session 3种方法1.context.getSession() -->>Map对象 2.HttpServletRequest request =(HttpServletRe ...
- python接口测试-项目实践(二)获取接口响应,取值(re、json)
一 分别请求3个接口,获取响应. 第三方接口返回有两种:1 纯字符串 2 带bom头的json字串 import requests api1 = 'url1' response1 = request ...
- 开始学习git
今天看着廖雪峰的git使用教程开始学习git.不过没有将项目托管在github上,而是选择托管在了码云上. 看着明白做起来还是出了些问题,不过好在最后都解决了.果然眼高手低要不得. 试着将自己平时学习 ...
- IOS 多媒体 使用总结
一.音频播放 1.音效播放(短时间的音频文件)1> AudioServicesCreateSystemSoundID2> AudioServicesPlaySystemSound 2.音乐 ...
- table中设置tr行间距
CSS border-collapse 属性设置表格的边框是否被合并为一个单一的边框 值 描述 separate 默认值.边框会被分开.不会忽略 border-spacing 和 empty-cell ...
- n对mod求模整除时转化成mod的数学式
n对mod求模,它的值在0到mod-1之间,如果要求模整除的时候转化成mod可以用下面的式子: n = (n - 1 % mod + mod) % mod +1 这里先减一,模上mod再加一,这样如果 ...
- Python Day 15 递归、匿名函数、内置函数
阅读目录 内容回顾 生成器的send方法 递归 匿名函数 内置函数 ##内容回顾 #1.带参装饰器 - 自定义 | wraps def wrap(info) def outer1(func): fro ...
- 【luogu P2947 [USACO09MAR]向右看齐Look Up】 题解
题目链接:https://www.luogu.org/problemnew/show/P2947 因为在单调队列上被dalao们锤爆 怒刷单调队列题 何为单调队列? 设我们的队列为从左至右单调递增 对 ...
- Android学习笔记_21_ViewFlipper使用详解 手势识别器
一.介绍ViewFilpper类 1.1 屏幕切换 屏幕切换指的是在同一个Activity内屏幕见的切换,最长见的情况就是在一个FrameLayout内有多个页面,比如一个系统设置页面:一个个性化设置 ...