博客
关于我
1337: 最大值
阅读量:766 次
发布时间:2019-03-23

本文共 302 字,大约阅读时间需要 1 分钟。

1337: 最大值

描述

输入一个整数n和n个整数,输出这n个整数中的最大值。

输入输出格式

输入有两行:第一行是一个正整数n,第二行是n个整数。

输出

输出一个整数,即n个数中的最大值,单独占一行。

代码

#include <stdio.h>#include <math.h>

int main() {int n, i, j, max;scanf("%d", &n);scanf("%d", &j);max = j;for (i = 1; i < n; i++) {scanf("%d", &j);if (j > max) {max = j;}}printf("%d", max);return 0;}

转载地址:http://kngzk.baihongyu.com/

你可能感兴趣的文章
Oracle 11g 数据类型
查看>>
Oracle 11g 编译使用BBED
查看>>
oracle 11g 静默安装
查看>>
Oracle 11gR2学习之二(创建数据库及OEM管理篇)
查看>>
Oracle 11gR2构建RAC之(2)--配置共享存储
查看>>
Oracle 11g中的snapshot standby特性
查看>>
Oracle 11g关闭用户连接审计
查看>>
Oracle 11g忘记sys、system、scott密码该这样修改!
查看>>
Oracle 11g数据库安装和卸载教程
查看>>
Oracle 11g数据库成功安装创建详细步骤
查看>>
Oracle 11g超详细安装步骤
查看>>
Oracle 12c中的MGMTDB
查看>>
Oracle 12c安装报错Installation failed to access the temporary location(无法访问临时位置)...
查看>>
Oracle 9i数据库管理教程
查看>>
ORACLE Active dataguard 一个latch: row cache objects BUG
查看>>
oracle avg、count、max、min、sum、having、any、all、nvl的用法
查看>>
Oracle BEQ方式连接配置
查看>>
oracle Blob保存方式,oracle 存储过程操作blob
查看>>
Oracle BMW Racing sailing vessel帆船图
查看>>
ORACLE Bug 4431215 引发的血案—原因分析篇
查看>>