fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main ()
  5. {
  6. int i , j ;
  7. for(i= 2 ; i<=16 ; i++ )
  8. {
  9. for (j =2 ;j<=(i/j) ; j++)
  10. cout << "true for i = " << i << " and j = " << j << endl;
  11. }
  12. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
true for i = 4 and j = 2
true for i = 5 and j = 2
true for i = 6 and j = 2
true for i = 7 and j = 2
true for i = 8 and j = 2
true for i = 9 and j = 2
true for i = 9 and j = 3
true for i = 10 and j = 2
true for i = 10 and j = 3
true for i = 11 and j = 2
true for i = 11 and j = 3
true for i = 12 and j = 2
true for i = 12 and j = 3
true for i = 13 and j = 2
true for i = 13 and j = 3
true for i = 14 and j = 2
true for i = 14 and j = 3
true for i = 15 and j = 2
true for i = 15 and j = 3
true for i = 16 and j = 2
true for i = 16 and j = 3
true for i = 16 and j = 4