I want to get a positive value. Can I get it in a simpler way?
Code:int iMinutes = 15; iMinutes -= 60; iMinutes *= -1; cout << iMinutes << endl;
I want to get a positive value. Can I get it in a simpler way?
Code:int iMinutes = 15; iMinutes -= 60; iMinutes *= -1; cout << iMinutes << endl;
Using Windows 10 with Code Blocks and MingW.
int minutes = 45;
or
int minutes = 15;
minutes = 60-minutes;
you really shouldn't have to ask this, should you? O_o
No I shouldnt.
Thanks!
Using Windows 10 with Code Blocks and MingW.