杭电acm--2071
来源:互联网 发布:德军 知乎 编辑:程序博客网 时间:2024/06/08 04:18
Problem Description
There are some students in a class, Can you help teacher find the highest student .
Input
There are some cases. The first line contains an integer t, indicate the cases; Each case have an integer n ( 1 ≤ n ≤ 100 ) , followed n students’ height.
Output
For each case output the highest height, the height to two decimal plases;
#include<stdio.h>#include<stdlib.h>#include<math.h>//#include<string.h>//#define P 3.141592653void main(){int t, n;double max, arr[100];scanf("%d", &t);while (t--){scanf("%d", &n);for (int i = 0; i<n; i++)scanf("%lf", &arr[i]);max = arr[0];for (int i = 1; i<n; i++)if (max<arr[i])max = arr[i];printf("%.2lf\n", max);}system("pause");}
0 0
- 杭电acm--2071
- 杭电ACM 2071:Max Num
- 杭电ACM 1003
- 杭电 ACM 2016
- 杭电acm 1010
- 杭电 acm 1045
- 杭电ACM-1010
- 杭电ACM 1172
- 杭电ACM 1174
- 杭电ACM 1175
- 杭电ACM 分类
- 杭电ACM分类
- 杭电acm 1000
- 杭电acm 1001
- 杭电acm 1002
- 杭电acm分类
- 杭电acm分类
- 杭电 ACM 1004
- Hibernate sql操作的三种方法 HQL QBC Native SQL查询
- HDU 5477 A Sweet Journey(本场的最水题,过程处理好是关键)——2015 ACM/ICPC Asia Regional Shanghai Online
- ListView乱谈之ListView的滚动原理
- Android网络编程之搭建一个属于你自己的简单servlet服务端。
- 黑马程序员-----java基础(IO上)
- 杭电acm--2071
- 顶点动画原理和实例之MD2FrameAnimation
- didLoadFromCCB方法的调用顺序
- win8系统桌面自动刷新解决方案
- .Net 学习记录 首篇
- 大数据学习篇:hadoop深入浅出系列之HDFS(六) ——JavaAPI操作
- 课程设计
- set serveroutput on
- hdu5475An easy problem 线段树