#include <iostream>
usingnamespace std;
int main() {
int i, j; // Declare two new integer variables, named 'i' and 'j',
for (i = 2; i < 16; i++) {
/* "int i = 2;" - Initalize 'i' with a value of 2.
This is the index integer.
"i < 16;" - While the value of 'i' is less than 16. The loop will
continue until this expression becomes true, so it will iterate
14 times in this case.
"i++" - Increment the value of 'i' by 1. '++' is the Increment operator.
It is equivalent to "i += 1;" or "i = i + 1;"
So, it basically means: 'i' is 2; keep going as long as 'i'
is less than 16, stop when it is 16; increment 'i' by 1;
Perform below actions while condition is true.
To sum it up even more, it means "Do each of these things below
while i < 16 and increment i by one each time until it hits 16" */
for (int j = 2; j <= (i / j); j++)
/* Initialize 'j' with a value of 2;
while j is less than or equal toi divided by j; increment j;
Do these things while condition is true: {things;} */
if (!(i % j)) break; /* Try to divide i by j, if not successful then
break the for loop;
! is the 'NOT TRUE' operator.*/
if (j > (i / j)) // If j is greater thani divided by j,
cout << i << " / " << j << endl; // print the value of i, then a slash,
// then the value of j,
// followed by a newline;
}
}