if X=4
what doe this statement do..........sales*=X++;
and can you write a basic program to show outcome?
if X=4
what doe this statement do..........sales*=X++;
and can you write a basic program to show outcome?
>>sales*=X++;
It means sales = sales * X, and then increase X by 1.
Therefore
int sales = 10;
int X = 10;
sales*=X++;
cout << "Sales is now 10 times 10 = " << sales <<endl;
cout << "X is now incremented and is now " << X;