My code extract is
if (num == 0) {
cout << 1;
cout << 2;
}
else if (num == 1) {
cout << 0;
cout << 2;
}
else if (num == 2) {
cout << 0;
cout << 1;
}
where 0 <= num <= 2.
I am asking because the cout << ...
statements will be converted into something much larger, but (almost) identical to each other.
*I mean optimize as 'beautify' the code (ex. remove the 5 repeated cout
statements).
I didn't put "beautify" in the question because it just sounds weird in a SO question.