题目描述

(Find the Largest) The process of finding the largest number (i.e., the maximum of a group of numbers) is used frequently in computer applications. For example, a program that determines the winner of a sales contest inputs the number of units sold by each salesperson. The salesperson who sells the most units wins the contest. Write a C++ program that uses a while statement to determine and print the largest number of 10 numbers input by the user. Your program should use three variables, as follows:
counter: A counter to count to 10 (i.e., to keep track of how many numbers have been input and to determine when all 10 numbers have been processed).
number: The current number input to the program.
largest: The largest number found so far.


输入格式

The input consists of n (0<n<100) lines.
Each line consists of 10 integers(range from 0 to 100).
The last line of input consists of Int(-1).


输出格式


样例数据

输入

1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1
-1

输出

Largest is 10
Largest is 10

备注


操作

评测记录

优秀代码

信息

时间限制: 1s
内存限制: 128MB
评测模式: Normal

题解