C++ examples for Data Type:int
The negative of a variable that contains a negative value.
#include <iostream> using namespace std; int main()//from w w w .j av a 2 s .c o m { signed int temp=-12; // 'signed' is not needed because it is the default. cout << -temp << "\n"; // Produces a 12 on-screen. return 0; }