The red pieces above do not do anything useful [if the compiler doesn't completely optimize it away, it will generate a value of 0 since value < value and value > value are always false]. You should get some sort of warning from the compiler about "statement with no effect" if you enable warnings.

In math, how you do convert a value from positive to negative?

--
Mats

Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.

Implicit main is not allowed in C++.
Iostream.h is not a standard header.
cout, cin, endl are located in the std namespace.
conio.h is a non-standard header and getch() is a non-standard function. Better use cin.get() instead, and get rid of both those two.

Are by chance using Turbo C++ or some other old compiler? This won't compile.