Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. int f(int n) {
  2.     if (n%2 != 0) return false;
  3.     int results[n][2];
  4.     int current_i_index = 0;
  5.     for(int i = 2; i < n; i++) {
  6.         for(int j = 2; j < n; j++) {
  7.             if (isPrime(i) && isPrime(j) && i+j==n) {
  8.                 results[current_i_index][0] = i;
  9.                 results[current_i_index][1] = j;
  10.                 current_i_index++;
  11.             }
  12.         }
  13.     }
  14.     return results;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement