Advertisement
VXP

Untitled

VXP
Sep 19th, 2014
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. double count = richTextBox1->Lines->Length;
  2. int test = 1;
  3. for( int i = 0; i < count; i++ )
  4. {
  5.     double current = Convert::ToDouble(richTextBox1->Lines[i]);
  6.     double prev = 0.0;
  7.     if( i > 1 )
  8.         prev = Convert::ToDouble(richTextBox1->Lines[i-1]);
  9.  
  10.     if( i > 1 && current > prev )
  11.         test++;
  12. }
  13. if( test == count-1 )
  14.     label2->Text = "YES"+test+", "+count;
  15. else
  16.     label2->Text = "No"+test+", "+count;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement