Nagendra C.

asked • 12/26/22

Maximum You are given N number of inputs. Print the maximum of them after each input.

Maximum You are given N number of inputs. Print the maximum of them after each input.


Explanation In the example, you are given 6 inputs 1, 0, 3, 2, 9, 8

1 is maximum in the input 1.

1 is maximum in the input 1, 0.

3 is maximum in the input 1, 0, 3.

3 is maximum in the input 1, 0, 3, 2.

9 is maximum in the input 1, 0, 3, 2, 9.

9 is maximum in the input 1, 0, 3, 2, 9,


so,the output should be

1

3

3

9

9


2 Answers By Expert Tutors

By:

Michael M. answered • 12/27/22

Tutor
5 (12)

Data Scientist with over 12 Years Instruction Experience

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.