Language: C++

#include <iostream>
#include <string>
using namespace std;

int main(){
	string s;

	cin >> s;

	while(s!=??????){	
		char c[] = s;
		int i[s.size()];
		int x=0;

		for(int i=0;i<s.size()-1;i++){
			i[i] = c[i] - ???0???;
		}

		for(int j=0;j<s.size()-1;j++){
			x += i[j];
		}

		if(x != 0)	cout << x << endl;

		cin >> s;
	}
	return 0;
}

Compiler output:
a.cc:10:22: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
   10 |         while(s!=??????){
a.cc: In function 'int main()':
a.cc:10:18: error: expected primary-expression before '?' token
   10 |         while(s!=??????){
      |                  ^
a.cc:10:19: error: expected primary-expression before '?' token
   10 |         while(s!=??????){
      |                   ^
a.cc:10:20: error: expected primary-expression before '?' token
   10 |         while(s!=??????){
      |                    ^
a.cc:10:21: error: expected primary-expression before '?' token
   10 |         while(s!=??????){
      |                     ^
a.cc:10:22: error: expected primary-expression before '?' token
   10 |         while(s!=??????){
      |                      ^
a.cc:10:23: error: expected primary-expression before '?' token
   10 |         while(s!=??????){
      |                       ^
a.cc:10:24: error: expected primary-expression before ')' token
   10 |         while(s!=??????){
      |                        ^
a.cc:10:24: error: expected ':' before ')' token
   10 |         while(s!=??????){
      |                        ^
      |                        :
a.cc:10:24: error: expected primary-expression before ')' token
a.cc:10:24: error: expected ':' before ')' token
   10 |         while(s!=??????){
      |                        ^
      |                        :
a.cc:10:24: error: expected primary-expression before ')' token
a.cc:10:24: error: expected ':' before ')' token
   10 |         while(s!=??????){
      |                        ^
      |                        :
a.cc:10:24: error: expected primary-expression before ')' token
a.cc:10:24: error: expected ':' before ')' token
   10 |         while(s!=??????){
      |                        ^
      |                        :
a.cc:10:24: error: expected primary-expression before ')' token
a.cc:10:24: error: expected ':' before ')' token
   10 |         while(s!=??????){
      |                        ^
      |                        :
a.cc:10:24: error: expected primary-expression before ')' token
a.cc:10:24: error: expected ':' before ')' token
   10 |         while(s!=??????){
      |                        ^
      |                        :
a.cc:10:24: error: expected primary-expression before ')' token
a.cc:11:28: error: initializer fails to determine size of 'c'
   11 |                 char c[] = s;
      |                            ^
a.cc:11:28: error: array must be initialized with a brace-enclosed initializer
a.cc:16:26: error: invalid types 'int[int]' for array subscript
   16 |                         i[i] = c[i] - ???0???;
      |                          ^
a.cc:16:39: error: expected primary-expression before '?' token
   16 |                         i[i] = c[i] - ???0???;
      |                                       ^
a.cc:16:40: error: expected primary-expression before '?' token
   16 |                         i[i] = c[i] - ???0???;
      |                                        ^
a.cc:16:41: error: expected primary-expression before '?' token
   16 |                         i[i] = c[i] - ???0???;
      |                                         ^
a.cc:16:44: error: expected primary-expression before '?' token
   16 |                         i[i] = c[i] - ???0???;
      |                                            ^
a.cc:16:45: error: expected primary-expression before '?' token
   16 |                         i[i] = c[i] - ???0???;
      |                                             ^
a.cc:16:46: error: expected primary-expression before ';' token
   16 |                         i[i] = c[i] - ???0???;
      |                                              ^
a.cc:16:46: error: expected ':' before ';' token
   16 |                         i[i] = c[i] - ???0???;
      |                                              ^
      |                                              :
a.cc:16:46: error: expected primary-expression before ';' token
a.cc:16:46: error: expected ':' before ';' token
   16 |                         i[i] = c[i] - ???0???;
      |                                              ^
      |                                              :
a.cc:16:46: error: expected primary-expression before ';' token
a.cc:16:46: error: expected ':' before ';' token
   16 |                         i[i] = c[i] - ???0???;
      |                                              ^
      |                                              :
a.cc:16:46: error: expected primary-expression before ';' token
a.cc:16:46: error: expected ':' before ';' token
   16 |                         i[i] = c[i] - ???0???;
      |                                              ^
      |                                              :
a.cc:16:46: error: expected primary-expression before ';' token
a.cc:16:46: error: expected ':' before ';' token
   16 |                         i[i] = c[i] - ???0???;
      |                                              ^
      |                                              :
a.cc:16:46: error: expected primary-expression before ';' token
a.cc:16:46: error: expected ':' before ';' token
   16 |                         i[i] = c[i] - ???0???;
      |                                              ^
      |                                              :
a.cc:16:46: error: expected primary-expression before ';' token