Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace _05IncreasingSequenceofElements
- {
- using System;
- using System.Linq;
- class IncreasingSequenceofElements
- {
- static void Main()
- {
- int[] arrayInput = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
- bool isIncremental = true;
- for (int i = 1; i < arrayInput.Length; i++)
- {
- if (arrayInput[i] < arrayInput[i - 1])
- {
- isIncremental = false;
- break;
- }
- }
- if (isIncremental)
- {
- Console.WriteLine("Yes");
- }
- else
- {
- Console.WriteLine("No");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement