Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace _08_Increasing_Elements
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine());
- int count = 0;
- var b = int.MinValue;
- int countNow = 0;
- for (int i = 1; i <= n; i++)
- {
- int a = int.Parse(Console.ReadLine());
- if (a > b) { countNow++; }
- else { countNow = 1; }
- b = a;
- if ( count < countNow)
- { count = countNow; }
- }
- Console.WriteLine(count);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement