Some minor things, but may still be worth mentioning: Whenever `std::endl` is used, the buffer gets flushed, which can add to performance a bit, especially if it's done multuple times. In order to get a newline without this added flush, use `"\n"` within an output statement: std::cout << "\n"; Also, consider adding a bit more whitespace within the multiple loop statements for added readability: for (int a = 1; a <= 100; a++)