1059: 最高分

Posted binanry

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了1059: 最高分相关的知识,希望对你有一定的参考价值。

题目描述

 输入一批学生的成绩(整数),输出最高分。 

输入

 输入包含多个非负整数和一个负整数。该负数不作为有效成绩,只表示输入结束。 

输出

 输出一个整数,即最高分。单独占一行。 

样例输入

 7 6 5 9 2 -1

样例输出

9

提示

 ...

来源

* 

#include<stdio.h> 
#include<limits.h>  //....tou  wenjian
 
 
int main() 

    int score, max; 
 
    max = INT_MIN; 
 
    while( scanf("%d", &score), score >= 0) //逗号表达式 
    { 
        if(score > max) 
            max = score; 
    } 
 
    printf("%d ", max); 
    return 0; 



















以上是关于1059: 最高分的主要内容,如果未能解决你的问题,请参考以下文章

PAT1059

题解 P1059 明明的随机数

Luogu1059 明明的随机数

bzoj1059题解

CF1059C Sequence Transformation 题解

问题 1059: C二级辅导-等差数列