SHARE
TWEET

Untitled

a guest Jun 19th, 2017 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. class IncreasingSequenceOfElements
  4. {
  5.     static void Main()
  6.     {
  7.         string[] inputArr = Console.ReadLine().Split(' ');
  8.         int[] numbersArr = new int[inputArr.Length];
  9.         int temp = 0;
  10.         bool isIncresingSequence = false;
  11.  
  12.  
  13.         for (int i = 0; i < numbersArr.Length; i++)
  14.         {
  15.             numbersArr[i] = int.Parse(inputArr[i]);
  16.  
  17.             isIncresingSequence = numbersArr[i] > temp;
  18.  
  19.  
  20.             temp = numbersArr[i];
  21.             if (isIncresingSequence == false)
  22.             {
  23.                 break;
  24.             }
  25.         }
  26.         if (isIncresingSequence)
  27.         {
  28.             Console.WriteLine("Yes");
  29.         }
  30.         else
  31.         {
  32.             Console.WriteLine("No");
  33.         }
  34.  
  35.     }
  36. }
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top