Language: C++

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

int main(){
	string s;

	cin >> s;

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

		for(int k=0;k<s.size()-1;k++){
			i[k] = c[k] - ???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:23: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
   10 |         while(s!=???0???){
a.cc: In function 'int main()':
a.cc:10:18: error: expected primary-expression before '?' token
   10 |         while(s!=???0???){
      |                  ^
a.cc:10:19: error: expected primary-expression before '?' token
   10 |         while(s!=???0???){
      |                   ^
a.cc:10:20: error: expected primary-expression before '?' token
   10 |         while(s!=???0???){
      |                    ^
a.cc:10:23: error: expected primary-expression before '?' token
   10 |         while(s!=???0???){
      |                       ^
a.cc:10:24: error: expected primary-expression before '?' token
   10 |         while(s!=???0???){
      |                        ^
a.cc:10:25: error: expected primary-expression before ')' token
   10 |         while(s!=???0???){
      |                         ^
a.cc:10:25: error: expected ':' before ')' token
   10 |         while(s!=???0???){
      |                         ^
      |                         :
a.cc:10:25: error: expected primary-expression before ')' token
a.cc:10:25: error: expected ':' before ')' token
   10 |         while(s!=???0???){
      |                         ^
      |                         :
a.cc:10:25: error: expected primary-expression before ')' token
a.cc:10:25: error: expected ':' before ')' token
   10 |         while(s!=???0???){
      |                         ^
      |                         :
a.cc:10:25: error: expected primary-expression before ')' token
a.cc:10:25: error: expected ':' before ')' token
   10 |         while(s!=???0???){
      |                         ^
      |                         :
a.cc:10:25: error: expected primary-expression before ')' token
a.cc:10:25: error: expected ':' before ')' token
   10 |         while(s!=???0???){
      |                         ^
      |                         :
a.cc:10:25: error: expected primary-expression before ')' token
a.cc:10:25: error: expected ':' before ')' token
   10 |         while(s!=???0???){
      |                         ^
      |                         :
a.cc:10:25: error: expected primary-expression before ')' token
a.cc:11:32: error: array must be initialized with a brace-enclosed initializer
   11 |                 char c[1000] = s;
      |                                ^
a.cc:16:39: error: expected primary-expression before '?' token
   16 |                         i[k] = c[k] - ???0???;
      |                                       ^
a.cc:16:40: error: expected primary-expression before '?' token
   16 |                         i[k] = c[k] - ???0???;
      |                                        ^
a.cc:16:41: error: expected primary-expression before '?' token
   16 |                         i[k] = c[k] - ???0???;
      |                                         ^
a.cc:16:44: error: expected primary-expression before '?' token
   16 |                         i[k] = c[k] - ???0???;
      |                                            ^
a.cc:16:45: error: expected primary-expression before '?' token
   16 |                         i[k] = c[k] - ???0???;
      |                                             ^
a.cc:16:46: error: expected primary-expression before ';' token
   16 |                         i[k] = c[k] - ???0???;
      |                                              ^
a.cc:16:46: error: expected ':' before ';' token
   16 |                         i[k] = c[k] - ???0???;
      |                                              ^
      |                                              :
a.cc:16:46: error: expected primary-expression before ';' token
a.cc:16:46: error: expected ':' before ';' token
   16 |                         i[k] = c[k] - ???0???;
      |                                              ^
      |                                              :
a.cc:16:46: error: expected primary-expression before ';' token
a.cc:16:46: error: expected ':' before ';' token
   16 |                         i[k] = c[k] - ???0???;
      |                                              ^
      |                                              :
a.cc:16:46: error: expected primary-expression before ';' token
a.cc:16:46: error: expected ':' before ';' token
   16 |                         i[k] = c[k] - ???0???;
      |                                              ^
      |                                              :
a.cc:16:46: error: expected primary-expression before ';' token
a.cc:16:46: error: expected ':' before ';' token
   16 |                         i[k] = c[k] - ???0???;
      |                                              ^
      |                                              :
a.cc:16:46: error: expected primary-expression before ';' token
a.cc:16:46: error: expected ':' before ';' token
   16 |                         i[k] = c[k] - ???0???;
      |                                              ^
      |                                              :
a.cc:16:46: error: expected primary-expression before ';' token