c# - if increasing/decreasing, do something -


i check whether integer increasing or decreasing , something.

int x = 0;

int y = 0;

if x increasing in value, y --;

thanks!

//loop starts //x gets modified if(x>tempx) {     //x increments }     else if (x<tempx) {     //x decrements  } else     //x remains same  int tempx=x; //loop ends 

Comments

Popular posts from this blog

c++11 - Intel compiler and "cannot have an in-class initializer" when using constexpr -

rest - Spring boot: Request method 'PUT' not supported -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -