Language: C++

#include<iostream>
using namespace std;
int main() {
  int count = 0;
  int num = 1;
  while(num != 0) {
    cin >> num;
????????????????????????if(num == 0)break;
    for (int i = 1; i < 501; i++) {
      for (int j = 1; j < 502; j++) {
        if (i < j && (i + j)*(j - i + 1) == num * 2) count++;
      }
    }
    cout << count << endl;
    count = 0;
  } 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |   ^
a.cc:8:4: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |    ^
a.cc:8:5: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |     ^
a.cc:8:6: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |      ^
a.cc:8:7: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |       ^
a.cc:8:8: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |        ^
a.cc:8:9: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |         ^
a.cc:8:10: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |          ^
a.cc:8:11: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |           ^
a.cc:8:12: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |            ^
a.cc:8:13: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |             ^
a.cc:8:14: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |              ^
a.cc:8:15: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |               ^
a.cc:8:16: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |                ^
a.cc:8:17: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |                 ^
a.cc:8:18: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |                  ^
a.cc:8:19: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |                   ^
a.cc:8:20: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |                    ^
a.cc:8:21: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |                     ^
a.cc:8:22: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |                      ^
a.cc:8:23: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |                       ^
a.cc:8:24: error: expected primary-expression before '?' token
    8 | ????????????????????????if(num == 0)break;
      |                        ^
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
      |                         :
a.cc:8:25: error: expected primary-expression before 'if'
    8 | ????????????????????????if(num == 0)break;
      |                         ^~
a.cc:8:25: error: expected ':' before 'if'
    8 | ?????????????????