题目链接:
求个最大值
AC代码:#include#include using namespace std;int main() { int n,x; int maxn; while(scanf("%d",&n) != EOF) { maxn = INT_MIN; while(n--) { scanf("%d",&x); if(maxn < x) maxn = x; } printf("%d\n",maxn); } return 0;}
本文共 383 字,大约阅读时间需要 1 分钟。
题目链接:
求个最大值
AC代码:#include#include using namespace std;int main() { int n,x; int maxn; while(scanf("%d",&n) != EOF) { maxn = INT_MIN; while(n--) { scanf("%d",&x); if(maxn < x) maxn = x; } printf("%d\n",maxn); } return 0;}
转载于:https://www.cnblogs.com/youpeng/p/10720889.html