[Solved] Don’t understand what this lines do [closed]


This is just a condensed one-line if statement.

if(a>b)win+=3;

This can be rewritten as

if (a>b)
{
    win = win + 3;
}

The following line

v.push_back(b-a)

Calculates the difference of b - a then uses push_back to add it to the end of the vector v.

3

solved Don’t understand what this lines do [closed]