criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>

int main(int argc, char *argv[]) {
  char c, count=0;
  while (std::cin >> c) {
    if (c == '1') count++
  }
  std::cout << count << std::endl;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:6:26: error: expected ';' before '}' token
    6 |     if (c == '1') count++
      |                          ^
      |                          ;
    7 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int count=0,s;
 
  cin >> s;
  
  
  if(s/100){
    count++;
    s-=100;
  }
 
  if(s/10){
    count++;
    s-=10;
  }
 
  if(s) {
  count++;
  }
 
  cout << count << endl;
 
  return 0;
}
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int count=0,s;

  cin >> s;
  
  
  if(s/100){
    count++;
    s-=100;
  }

  if(s/10){
    count++;
    s-=10;
  }

  if(s) {
  count++;
  }

  cout << count << endl;
 
  return 0;
}

Compiler output:
a.cc:31:5: error: redefinition of 'int main()'
   31 | int main() {
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main() {
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int a,x,y,z;
  cin >> a;
  x=a/100;
  y=(a-x*100)/10;
  z=(a-x*100-y*10)
  cout << x+y+z << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before 'cout'
    9 |   z=(a-x*100-y*10)
      |                   ^
      |                   ;
   10 |   cout << x+y+z << endl;
      |   ~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main() {
	string s;
	int counter=0;
	cin >> s;
	if (s[0] == '1') counter++;
	if (s[1] == '1') counter++;
	if (s[2] == '1') ++counter;

	cout << counter<< endl;
	
	return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: expected '}' at end of input
   14 |         return 0;
      |                  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C

#include <iostream>
#include <string>
using namespace std;
int main() {
	string s;
	int counter=0;
	cin >> s;
	if (s[0] == '1') counter++;
	if (s[1] == '1') counter++;
	if (s[2] == '1') ++counter;

	cout << counter<< endl;
	
	return 0;


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int s;
  cin >> s;
  int count = 0;
  if(s[0] == 1)count ++;
  if(s[1] == 1)count ++;
  if(s[2] == 1)count ++;
  
  cout << count << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: invalid types 'int[int]' for array subscript
    8 |   if(s[0] == 1)count ++;
      |       ^
a.cc:9:7: error: invalid types 'int[int]' for array subscript
    9 |   if(s[1] == 1)count ++;
      |       ^
a.cc:10:7: error: invalid types 'int[int]' for array subscript
   10 |   if(s[2] == 1)count ++;
      |       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  string s;
  cin >> s;
  int count = 0;
  if(s[0] == '1')count ++;
  if(s[1] == '1')count ++;
  if(s[2] == '1')count ++:
  
  cout << count << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: expected ';' before ':' token
   10 |   if(s[2] == '1')count ++:
      |                          ^
      |                          ;
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  string s;
  cin >> s;
  int count = 0;
  if(s[0] == 1)count ++;
  if(s[1] == 1)count ++;
  if(s[2] == 1)count ++:
  
  cout << count << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: expected ';' before ':' token
   10 |   if(s[2] == 1)count ++:
      |                        ^
      |                        ;
Language: C++

#include <bits/stdc++h>
using namespace std;
int main(){
  int a;
  cin>>a;
   cout<<a/100+(a%100)/10+a%2<<endl;
}

Compiler output:
a.cc:1:10: fatal error: bits/stdc++h: No such file or directory
    1 | #include <bits/stdc++h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++h>
using namespace std;
int main(){
  int a;
  cin>>a;
   cout<<a/100+(a%100)/10+a/2<<endl;
}

Compiler output:
a.cc:1:10: fatal error: bits/stdc++h: No such file or directory
    1 | #include <bits/stdc++h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int N;
  cin >> N;
 cout << a/100 + (a%100)/10 + (a%10)/1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'a' was not declared in this scope
    7 |  cout << a/100 + (a%100)/10 + (a%10)/1 << endl;
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int N;
  cin >> N;
 cout << N[0]+N[1]+N[2] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: invalid types 'int[int]' for array subscript
    7 |  cout << N[0]+N[1]+N[2] << endl;
      |           ^
a.cc:7:16: error: invalid types 'int[int]' for array subscript
    7 |  cout << N[0]+N[1]+N[2] << endl;
      |                ^
a.cc:7:21: error: invalid types 'int[int]' for array subscript
    7 |  cout << N[0]+N[1]+N[2] << endl;
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;
  int counter = 0;
  if(s.at(0)=="1"){counter++;}
  if(s.at(1)=="1"){counter++;}
  if(s.at(2)=="1"){counter++;}
  cout << counter << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(s.at(0)=="1"){counter++;}
      |      ~~~~~~~^~~~~
a.cc:9:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(s.at(1)=="1"){counter++;}
      |      ~~~~~~~^~~~~
a.cc:10:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(s.at(2)=="1"){counter++;}
      |      ~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;
  int counter = 0;
  if(s[0]=="1"){counter++;}
  if(s[1]=="1"){counter++;}
  if(s[2]=="1"){counter++;}
  cout << counter << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(s[0]=="1"){counter++;}
a.cc:9:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(s[1]=="1"){counter++;}
a.cc:10:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(s[2]=="1"){counter++;}
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;
  int counter = 0;
  if(s[0]=="1"){++counter;}
  if(s[1]=="1"){++counter;}
  if(s[2]=="1"){++counter;}
  cout << counter << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(s[0]=="1"){++counter;}
a.cc:9:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(s[1]=="1"){++counter;}
a.cc:10:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(s[2]=="1"){++counter;}
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  vecter(int) s(3);
  int count = 0;
  for(int i=0;i<2;i++){
    cin >> s[i];
    if(s[i] == 1){
      count++;
    }
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected primary-expression before 'int'
    5 |   vecter(int) s(3);
      |          ^~~
a.cc:5:3: error: 'vecter' was not declared in this scope
    5 |   vecter(int) s(3);
      |   ^~~~~~
a.cc:8:12: error: 's' was not declared in this scope
    8 |     cin >> s[i];
      |            ^
Language: C++

#include<iostream>
#include <string>
using namespace std;
int main()
{
	string s;
  	cin >> s;
  	int count = 0;
  	int length = s.length();
  	for (int i; i < length -1; i++) {
      if (s[i] == "1") {
        count++;
      }
    }
  cout << count << endl;
  	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |       if (s[i] == "1") {
Language: C++

#include<iostream>
#include <string>
using namespace std;
int main()　
{
	string s;
  	cin >> s;
  	int count = 0;
  	int length = s.length();
  	for (int i; i < length -1; i++) {
      if (s[i] == "1") {
        count++;
      }
    }
  cout << count << endl;
  	
}

Compiler output:
a.cc:4:11: error: extended character 　 is not valid in an identifier
    4 | int main()　
      |           ^
a.cc:4:11: error: expected initializer before '\U00003000'
    4 | int main()　
      |           ^~
Language: C++

#include<iostream>
#include <string>
using namespace std;
int main()　
{
	string s;
  	cin >> s;
  	int count = 0;
  	int length = string.length();
  	for (int i; i < length -1; i++) {
      if (s[i] == "1") {
        count++;
      }
    }
  cout << count << endl;
  	
}

Compiler output:
a.cc:4:11: error: extended character 　 is not valid in an identifier
    4 | int main()　
      |           ^
a.cc:4:11: error: expected initializer before '\U00003000'
    4 | int main()　
      |           ^~
Language: C++

#include<stdio.h>

int main(){
  int A[10];
  int B_square = 0;
  for (int i=0;i<3;i++){
    scanf("%d",A[i]);
    if(A[i] == 1){
      B_square += 1;
    }
  }
  printf(B_square);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   12 |   printf(B_square);
      |          ^~~~~~~~
      |          |
      |          int
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<stdio.h>

int main(){
  int A[10];
  int B_square = 0;
  for (int i=0;i<3;i++){
    scanf("%d",&A[i]);
    if(A[i] == 1){
      B_square += 1;
    }
  }
  print(B_square);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'print' was not declared in this scope; did you mean 'printf'?
   12 |   print(B_square);
      |   ^~~~~
      |   printf
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >>S;
  int ans = 0;
  for(int i = 0;i<3;i++){
    if(S.at(i)=="1"){
      ans += 1;
    }
  }
  cout <<ans <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if(S.at(i)=="1"){
      |        ~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >>S;
  int ans = 0;
  for(int i = 0;i<3;i++){
    if(S.at[i]=="1"){
      ans += 1;
    }
  }
  cout <<ans <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
    9 |     if(S.at[i]=="1"){
      |            ^
Language: C++

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

int ans;
string s;
int main(){
  cin >> s;
  if(s[0] == "1") ans++;
  if(s[1] == "1") ans++;
  if(s[2] == "1") ans++;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(s[0] == "1") ans++;
a.cc:10:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(s[1] == "1") ans++;
a.cc:11:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(s[2] == "1") ans++;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  char hairetu[2];
  
  cin >> hairetsu;
  cout << int(hairetu[0] + int(hairetu[1]) + int(hairetu[2] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'hairetsu' was not declared in this scope; did you mean 'hairetu'?
    7 |   cin >> hairetsu;
      |          ^~~~~~~~
      |          hairetu
a.cc:8:61: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator<<'
    8 |   cout << int(hairetu[0] + int(hairetu[1]) + int(hairetu[2] << endl;
      |                                                  ~~~~~~~~~~~^~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main() {
  string squares;
  int marblesCount;

  cin >> squares;

  for (int i = 0; i < squares.length; i++) {
    if (squares[i] == '1') {
      marblesCount++;
    }
  }

  cout << marblesCount << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   10 |   for (int i = 0; i < squares.length; i++) {
      |                       ~~~~~~~~^~~~~~
      |                                     ()
Language: C++

#include <bits/stdc++.h>
using namespace std;

int	main()
{
  int n, out = 0;
  cin >> n;
  while (n)
  {
    out++;
    n /= 10;
  }
  coit << out << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'coit' was not declared in this scope
   13 |   coit << out << endl;
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 
  int a;
  cin >> a;
  if(a==111){
    cout << 3;
  }
  if(a==011){
    cout << 2;
  }
  if(a==101){
    cout << 2;
  }if(a==110){
    cout << 2;
  }if(a==001){
    cout << 1;
  }if(a==010){
    cout << 1;
  }if(a==100){
    cout << 1;
  }if(a==000){
    cout << 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:26:4: error: expected '}' at end of input
   26 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 
  int a;
  cin >> a;
  if(a=111){
    cout << 3;
  }
  if(a=011){
    cout << 2;
  }
  if(a=101){
    cout << 2;
  }if(a=110){
    cout << 2;
  }if(a=001){
    cout << 1;
  }if(a=010){
    cout << 1;
  }if(a=100){
    cout << 1;
  }if(a=000){
    cout << 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:25:15: error: expected '}' at end of input
   25 |     cout << 0;
      |               ^
a.cc:24:13: note: to match this '{'
   24 |   }if(a=000){
      |             ^
a.cc:25:15: error: expected '}' at end of input
   25 |     cout << 0;
      |               ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <cmath>
#include <string>
using namespace std;
 
int main() {
  string input_sequence;
  cin >> input_sequence;
  int num_cells_placed = 0
  for(int i = 0; i < (int)input_sequence.size(); ++i){
    if (input_sequence[i] == '1'){
      num_cells_placed++; 
    }
  }
  cout << num_cells_placed << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'for'
   10 |   for(int i = 0; i < (int)input_sequence.size(); ++i){
      |   ^~~
a.cc:10:18: error: 'i' was not declared in this scope
   10 |   for(int i = 0; i < (int)input_sequence.size(); ++i){
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(void){
    string s;
    int rst=0;
    cin>>s;
    for(int i=0;i<s.len();i++){
        rst+=(int)(s[i]-'0');
    }
    cout<<rst<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'len'
    8 |     for(int i=0;i<s.len();i++){
      |                     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int ans=0;
  string a;
  cin >> a;
  if(a[0] == "1") ans++;
  if(a[1] == "1") ans++;
  if(a[2] == "1") ans++;
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(a[0] == "1") ans++;
a.cc:9:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(a[1] == "1") ans++;
a.cc:10:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(a[2] == "1") ans++;
Language: C++

//#include <iostream>
//#include <string>
using namespace std;
int ans;
string s;
int main(){
cin >> s;
if(s[0]=='1') ans++;
if(s[1]=='1') ans++;
if(s[2]=='1') ans++;
cout << ans << endl;
}

Compiler output:
a.cc:5:1: error: 'string' does not name a type
    5 | string s;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope
    7 | cin >> s;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | //#include <iostream>
a.cc:7:8: error: 's' was not declared in this scope
    7 | cin >> s;
      |        ^
a.cc:11:1: error: 'cout' was not declared in this scope
   11 | cout << ans << endl;
      | ^~~~
a.cc:11:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:16: error: 'endl' was not declared in this scope
   11 | cout << ans << endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | //#include <iostream>
Language: C

#include <stdio.h>
int main() {

int N,A[200];
int dmin;
int i;

scanf("%d",&N);
for(i=0;i<N;i++){
	int A;
	scanf("%d", &A);
	int d = 0;
	while(A%2 == 0){
	A /=2;
	++d;
	}

	dmin = min(dmin,d);
}

	printf("%d\n", dmin);
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:18:16: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   18 |         dmin = min(dmin,d);
      |                ^~~
      |                main
Language: C


#include <stdio.h>
int main() {

int N,A[200];
int dmin;
int i;

scanf("%d",&N);
for(i=0;i<N;i++){
	int A;
	scanf("%d", &A);
	int d = 0
	while(A%2 == 0){
	A /=2;
	++d;
	}

	dmin = min(dmin,d);
}

	printf("%d\n", dmin);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:9: error: expected ',' or ';' before 'while'
   14 |         while(A%2 == 0){
      |         ^~~~~
main.c:19:16: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   19 |         dmin = min(dmin,d);
      |                ^~~
      |                main
Language: C

#include <stdio.h>
int main() {

int N,A[200];
int dmin;
int i;

scanf("%d",&N);
for(i=0;i<N;i++){
	int A;
	scanf("%d", &A);
	int d = 0
	while(A%2 == 0){
	A /=2;
	++d
	}

	dmin = min(dmin,d);
}

	printf("%d\n", dmin);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:9: error: expected ',' or ';' before 'while'
   13 |         while(A%2 == 0){
      |         ^~~~~
main.c:18:16: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   18 |         dmin = min(dmin,d);
      |                ^~~
      |                main
Language: C

#include "stdio.h"
#include "string.h"
int main(void){
  char s[3];
  int count = 0;
  scanf("%s", s);

  for(i=0; i < 3; i++){
    if('1' == s[i]){
      count++;
    }
  }

  printf("%d\n", count);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:7: error: 'i' undeclared (first use in this function)
    8 |   for(i=0; i < 3; i++){
      |       ^
main.c:8:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include "stdio.h"
#include "string.h"
int main(void){
  char s[3] = "101";
  int count = 0;
  scanf("%s", s);

  for(i=0; i < 3; i++){
    if('1' == s[i]){
      count++;
    }
  }

  printf("%d\n", count);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:7: error: 'i' undeclared (first use in this function)
    8 |   for(i=0; i < 3; i++){
      |       ^
main.c:8:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include "stdio.h"
int main(void){
  char s[];
  int i = 0;
  scanf("%s", s);

  if(s[0] == '1'){
    i++;
  }
  if(s[1] == '1'){
    i++;
  }
  if(s[2] == '1'){
    i++;
  }

  printf("%d\n", i);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:8: error: array size missing in 's'
    3 |   char s[];
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int S, s1, s2, s3;
  cin >> S;
  if(S % 2 == 0){
    s3 = 0;
  } else {
    s3 = 1;
  }
  
  if((S - s3) % 2 / 10 == 0){
    s2 = 0;
  } else {
    s2 = 1;
  }
  
  if(S > 99){
    s1 = 1;
  } else {
    s1 = 0:
  }
  
  
  cout << s1 + s2 +s3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:11: error: expected ';' before ':' token
   22 |     s1 = 0:
      |           ^
      |           ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
  s = imput()
    print(s.count('1'))
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 's' was not declared in this scope
    4 |   s = imput()
      |   ^
a.cc:4:7: error: 'imput' was not declared in this scope
    4 |   s = imput()
      |       ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
  s = imput()
    print(s.count('1'))

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 's' was not declared in this scope
    4 |   s = imput()
      |   ^
a.cc:4:7: error: 'imput' was not declared in this scope
    4 |   s = imput()
      |       ^~~~~
a.cc:5:24: error: expected '}' at end of input
    5 |     print(s.count('1'))
      |                        ^
a.cc:3:13: note: to match this '{'
    3 | int main () {
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
  int s1;
  int s2;
  int s3;
  cin >> s1;
  cin >> s2;
  cin >> s3
  
  cout << s1 + s2 + s3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected ';' before 'cout'
    9 |   cin >> s3
      |            ^
      |            ;
   10 | 
   11 |   cout << s1 + s2 + s3 << endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
  int s1, s2, s3;
  cin >> s1s2s3;
  
  cout << s1 + s2 + s3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 's1s2s3' was not declared in this scope
    5 |   cin >> s1s2s3;
      |          ^~~~~~
Language: C

#include <stdio.h>
int main(void){
	char a[4],i,n=0;
	scanf("%s",a);
	for(i=0;i<3;i++){
		if(a[i]='1'){
			n++;
		}
	}
	printf("%d",n)
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:23: error: expected ';' before 'return'
   10 |         printf("%d",n)
      |                       ^
      |                       ;
   11 |         return 0;
      |         ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
  int s 1, s 2, s 3;
  cin >> s 1 >> s 2 >> s 3;
  
  cout << s 1 + s 2 + s 3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: expected initializer before numeric constant
    4 |   int s 1, s 2, s 3;
      |         ^
a.cc:5:10: error: 's' was not declared in this scope
    5 |   cin >> s 1 >> s 2 >> s 3;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  int ans = 0;
  cin >> s;
  if (s[0] == '1' ans++);
  if (s[1] == '1' ans++);
  if (s[2] == '1' ans++);
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected ')' before 'ans'
    8 |   if (s[0] == '1' ans++);
      |      ~           ^~~~
      |                  )
a.cc:9:18: error: expected ')' before 'ans'
    9 |   if (s[1] == '1' ans++);
      |      ~           ^~~~
      |                  )
a.cc:10:18: error: expected ')' before 'ans'
   10 |   if (s[2] == '1' ans++);
      |      ~           ^~~~
      |                  )
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  int ans = 0;
  cin >> s;
  if (s[0] == "1" ans++);
  if (s[1] == "1" ans++);
  if (s[2] == "1" ans++);
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if (s[0] == "1" ans++);
a.cc:8:18: error: expected ')' before 'ans'
    8 |   if (s[0] == "1" ans++);
      |      ~           ^~~~
      |                  )
a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if (s[1] == "1" ans++);
a.cc:9:18: error: expected ')' before 'ans'
    9 |   if (s[1] == "1" ans++);
      |      ~           ^~~~
      |                  )
a.cc:10:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if (s[2] == "1" ans++);
a.cc:10:18: error: expected ')' before 'ans'
   10 |   if (s[2] == "1" ans++);
      |      ~           ^~~~
      |                  )
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  int ans = 0;
  cin >> s;
  if (s[0] == "1"; ans++);
  if (s[1] == "1"; ans++);
  if (s[2] == "1"; ans++);
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if (s[0] == "1"; ans++);
a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if (s[1] == "1"; ans++);
a.cc:10:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if (s[2] == "1"; ans++);
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int s1, s2, s3;
  cin >> s1s2s3;
  cout << s1 + s2 + s3 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 's1s2s3' was not declared in this scope
    6 |   cin >> s1s2s3;
      |          ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int s1, s2, s3;
  cin >> s1 s2 s3;
  cout << s1 + s2 + s3 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected ';' before 's2'
    6 |   cin >> s1 s2 s3;
      |            ^~~
      |            ;
Language: C++

#include<iostream>
using namespace std;
int main(){
  int s[3],x=0;
  cin>>s[0]>>s[1]>>s[2];
  for(i=0;i<3;i++)
    if(s[i]==1)
      x++;
  cout<<x<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   for(i=0;i<3;i++)
      |       ^
Language: Java

import java.util.*;

public class practiceMain {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
		int count=0;
		for(int i=0;i<3;i++) {
			if(s.charAt(i)=='1') {
				count++;
			}
		}
		System.out.println(count);

	}

}


Compiler output:
Main.java:3: error: class practiceMain is public, should be declared in a file named practiceMain.java
public class practiceMain {
       ^
1 error
Language: Java

import java.util.*;

public class practiceMain {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
		int count=0;
		for(int i=0;i<3;i++) {
			if(s.charAt(i)==1) {
				count++;
			}
		}

	}

}


Compiler output:
Main.java:3: error: class practiceMain is public, should be declared in a file named practiceMain.java
public class practiceMain {
       ^
1 error
Language: C++

#include <iostream>

int main() {
	int a;
	cin >> a;
	int cnt = 0;
	if((a / 100) == 1) cnt++;
	if((a / 10) % 10 == 1) cnt++;
	if(a % 10 == 1) cnt++;
	cout << cnt << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin >> a;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout << cnt << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         cout << cnt << endl;
      |                        ^~~~
      |                        std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int a,;
  cin >> a;
  cout << a % 9 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before ';' token
    5 |   int a,;
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int a, b;
  cin >> a >> b >> c;
  cout << a + b + c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'c' was not declared in this scope
    6 |   cin >> a >> b >> c;
      |                    ^
Language: C

#include<stdio.h>
 
int main(){
  char s[4];
  int counter = 0;
  
  scanf("%s",s);
  
  if(s[0] == '1') ++counter;
  if(s[1] == '1') ++counter;
  if(s[2] == '1') ++counter;
  
  printf("%d",counter);
  
  return 0;

Compiler output:
main.c: In function 'main':
main.c:15:3: error: expected declaration or statement at end of input
   15 |   return 0;
      |   ^~~~~~
Language: C

#include<stdio.h>

int main(){
  char s[3];
  int counter = 0;
  
  scanf("%s",s);
  
  if(s[0] == '1') ++counter;
  if(s[1] == '1') ++counter;
  if(s[2] == '1') ++counter;
  
  printf("%d",counter);
  
  return 0;

Compiler output:
main.c: In function 'main':
main.c:15:3: error: expected declaration or statement at end of input
   15 |   return 0;
      |   ^~~~~~
Language: C

#include<stdio.h>

int main(){
  char s[3];
  int counter = 0;
  
  scanf("%s",s):
  
  if(s[0] == 1) ++counter;
  if(s[1] == 1) ++counter;
  if(s[2] == 1) ++counter;
  
  printf("%d",counter);
  
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:7:16: error: expected ';' before ':' token
    7 |   scanf("%s",s):
      |                ^
      |                ;
Language: C++

#include <bits/stdc++.h>
using namespace std;

int	main()
{
  int	s1;
  int	s2;
  int	s3;
  int	nb;
  
  cin >> s1s2s3;
  
  nb = 0;
  if (s1)
    nb++;
  
  if (s2)
    nb++;
  
  if (s3)
    nb++;
  
  cout << nb << endl;
  
  return (0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 's1s2s3' was not declared in this scope
   11 |   cin >> s1s2s3;
      |          ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int a , b , c;
  cin >> a >> b >> c；
  cout << a + b + c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'c\U0000ff1b' was not declared in this scope
    6 |   cin >> a >> b >> c；
      |                    ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int s1 , s2 , s3;
  cin >> s1 >> s2 >> s3；
  cout << s1 + s2 + s3 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: 's3\U0000ff1b' was not declared in this scope
    6 |   cin >> s1 >> s2 >> s3；
      |                      ^~~~
Language: C++

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

int main() {
  string s;
  cin >> s;
  int counter = 0;
  if (s[0] == "1") ++counter;
  if (s[1] == "1") ++counter;
  if (s[2] == "1") ++counter;
  cout << counter << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if (s[0] == "1") ++counter;
a.cc:10:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if (s[1] == "1") ++counter;
a.cc:11:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if (s[2] == "1") ++counter;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a;
  string s;
  cin  >> s;
  if(s[0]=="1") a++;
  if(s[1]=="1") a++;
  if(s[2]=="1") a++;
  cout << a << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(s[0]=="1") a++;
a.cc:9:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(s[1]=="1") a++;
a.cc:10:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(s[2]=="1") a++;
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
    #define rep(i, n) for (int i = 0; i < (int)(n); i++)
     
    int main() {
      sting A;
      cin >> A;
      int ans = 0;
      if (A[0] == '1') {
        ans ++;
      }
      if (A[1] == '1') {
        ans ++;
      }
      if (A[2] == '1') {
        ans ++;
      }
      cout << ans << endl;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'sting' was not declared in this scope
    6 |       sting A;
      |       ^~~~~
a.cc:7:14: error: 'A' was not declared in this scope
    7 |       cin >> A;
      |              ^
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
    #define rep(i, n) for (int i = 0; i < (int)(n); i++)
     
    int main() {
      string A;
      cin >> A;
      int ans = 0;
      if (A[0] == "1") {
        ans ++;
      }
      if (A[1] == "1") {
        ans ++;
      }
      if (A[2] == "1") {
        ans ++;
      }
      cout << ans << endl;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |       if (A[0] == "1") {
a.cc:12:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |       if (A[1] == "1") {
a.cc:15:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |       if (A[2] == "1") {
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
    #define rep(i, n) for (int i = 0; i < (int)(n); i++)
     
    int main() {
      sting A;
      cin >> A;
      int ans = 0;
      if (A[0] == "1") {
        ans ++;
      }
      if (A[1] == "1") {
        ans ++;
      }
      if (A[2] == "1") {
        ans ++;
      }
      cout << ans << endl;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'sting' was not declared in this scope
    6 |       sting A;
      |       ^~~~~
a.cc:7:14: error: 'A' was not declared in this scope
    7 |       cin >> A;
      |              ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int a, b, c, x;
	cin >> a >> b >> c;
  x = 0;
  
 if(a == "1"){
   x++;
 }
  if(b == "1"){
    x++;
  }
  if(c == "1"){
    x++;
  }
	cout << x<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |  if(a == "1"){
      |     ~~^~~~~~
a.cc:12:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if(b == "1"){
      |      ~~^~~~~~
a.cc:15:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   if(c == "1"){
      |      ~~^~~~~~
Language: C++

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

int main(){
  string s;
  cin >> s;
  int i, count=0;
  
  for(i=0;i<=3;++i){
    if(s[i] == '1') ++count;
  }
  cout << count << endl;
  
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: iostrem: No such file or directory
    1 | #include <iostrem>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main()
{
	std::string s;
	std::cin >> s;

	cout << std::count(s.cbegin(), s.cend(), '1');

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: 'count' is not a member of 'std'; did you mean 'cout'?
   12 |         cout << std::count(s.cbegin(), s.cend(), '1');
      |                      ^~~~~
      |                      cout
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
	int s;
    cin >> s;
    int S1 = s/100:
    int S2 = (s-S1*100)/10;
    int S3 = s%10;
    int count = 0;
    if(S1 == 1){
      count++;
    }
    if(S2 == 1){
      count++;
    }
    if(S3 == 1){
      count++;
    }
    cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected ',' or ';' before ':' token
    7 |     int S1 = s/100:
      |                   ^
a.cc:14:8: error: 'S2' was not declared in this scope; did you mean 'S3'?
   14 |     if(S2 == 1){
      |        ^~
      |        S3
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int s1s2s3;
  cin >> s1s2s3;
  int a, b, c;
  100 * a + 10 * b + c = s1s2s3;
  cout << a + b + c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: lvalue required as left operand of assignment
    8 |   100 * a + 10 * b + c = s1s2s3;
      |   ~~~~~~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int 100 * a + 10 * b + c;
  cin >> a >> b >> c;
  cout << a + b + c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before numeric constant
    5 |   int 100 * a + 10 * b + c;
      |       ^~~
a.cc:6:10: error: 'a' was not declared in this scope
    6 |   cin >> a >> b >> c;
      |          ^
a.cc:6:15: error: 'b' was not declared in this scope
    6 |   cin >> a >> b >> c;
      |               ^
a.cc:6:20: error: 'c' was not declared in this scope
    6 |   cin >> a >> b >> c;
      |                    ^
Language: C++

'#include <bits/stdc++.h>
using namespace std;

int main() {
  int ans;
  string s;
  cin >> s;
  if(s[0] == '1') ans++;
  if(s[1] == '1') ans++;
  if(s[2] == '17) ans++;
  
  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc:1:1: warning: missing terminating ' character
    1 | '#include <bits/stdc++.h>
      | ^
a.cc:1:1: error: missing terminating ' character
    1 | '#include <bits/stdc++.h>
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:10:14: warning: missing terminating ' character
   10 |   if(s[2] == '17) ans++;
      |              ^
a.cc:10:14: error: missing terminating ' character
   10 |   if(s[2] == '17) ans++;
      |              ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | '#include <bits/stdc++.h>
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> s;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | '#include <bits/stdc++.h>
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s;
      |          ^
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout << ans << endl;
      |   ^~~~
a.cc:12:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:18: error: 'endl' was not declared in this scope
   12 |   cout << ans << endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | '#include <bits/stdc++.h>
a.cc:14:3: error: expected primary-expression before 'return'
   14 |   return 0;
      |   ^~~~~~
a.cc:12:23: error: expected ')' before 'return'
   12 |   cout << ans << endl;
      |                       ^
      |                       )
   13 | 
   14 |   return 0;
      |   ~~~~~~               
a.cc:10:5: note: to match this '('
   10 |   if(s[2] == '17) ans++;
      |     ^
Language: C++

include <bits/stdc++.h>
using namespace std;
 
int main() {
  cin >> a;
  cout << (a/100)%2 + (a/10)%2 + a%2 << endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> a;
      |   ^~~
a.cc:5:10: error: 'a' was not declared in this scope
    5 |   cin >> a;
      |          ^
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout << (a/100)%2 + (a/10)%2 + a%2 << endl;
      |   ^~~~
a.cc:6:41: error: 'endl' was not declared in this scope
    6 |   cout << (a/100)%2 + (a/10)%2 + a%2 << endl;
      |                                         ^~~~
Language: C++

include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a;
  cin >> a;
  cout << (a/100)%2 + (a/10)%2 + a%2 << endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> a;
      |   ^~~
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout << (a/100)%2 + (a/10)%2 + a%2 << endl;
      |   ^~~~
a.cc:7:41: error: 'endl' was not declared in this scope
    7 |   cout << (a/100)%2 + (a/10)%2 + a%2 << endl;
      |                                         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
	int a;
    cin >> a >> A;
	cout << -109*(a/100)-9*(a/10)-a <<endl;
  // ここにプログラムを追記
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'A' was not declared in this scope
    6 |     cin >> a >> A;
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
	int a,b;
    cin >> a >> b >>c;
	cout << a+b+c <<endl;
  // ここにプログラムを追記
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: 'c' was not declared in this scope
    6 |     cin >> a >> b >>c;
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
	int a,b,c;
    cin >> abc;
	cout << a+b+c <<endl;
  // ここにプログラムを追記
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'abc' was not declared in this scope; did you mean 'abs'?
    6 |     cin >> abc;
      |            ^~~
      |            abs
Language: C++

int main() {
  int s0, s;
  cin >> s0;
  int s1, s2, s3;
  
  s1 = s0 / 100;
  s2 = (s0 % 100) / 10;
  s3 = s0 % 10;
  
  cout << s1 + s2 + s3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> s0;
      |   ^~~
a.cc:10:3: error: 'cout' was not declared in this scope
   10 |   cout << s1 + s2 + s3 << endl;
      |   ^~~~
a.cc:10:27: error: 'endl' was not declared in this scope
   10 |   cout << s1 + s2 + s3 << endl;
      |                           ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int a, b, c, d, e;
  cin >> a;
  b = a - a % 100 // 三の位の百倍
  c = a - b // 下二桁
  d = c % 10 // 下一桁（＝一の位）
  e = c - d // 二の位の十倍
  cout << b / 100 + e / 10 + d << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected ';' before 'c'
    7 |   b = a - a % 100 // 三の位の百倍
      |                  ^
      |                  ;
    8 |   c = a - b // 下二桁
      |   ~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include<cmath>


using namespace std;

int main(){
    string s;
    cin>>s;
    int counter=0;
    if(s[0]=='1')++counter;
    if(s[1]=='1')++counter;
    if(s[2]=='1')++counter;

    cout<<coutner<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: 'coutner' was not declared in this scope; did you mean 'counter'?
   17 |     cout<<coutner<<endl;
      |           ^~~~~~~
      |           counter
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
  
  char a[3];
  cin >> a;
  int cnt = 0;
  for(int i=0;i<3;i++){
    if (a[i]=="1"){
      cnt += 1;
    }
  }
  cout << cnt << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if (a[i]=="1"){
      |         ~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
  
  char a[3];
  cin >> a;
  int cnt = 0;
  for(int i=0;i<3;i++){
    if (a[i]=="1"){
      cnt += 1;
    }
  }
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if (a[i]=="1"){
      |         ~~~~^~~~~
Language: C++

#include <iostream>
#include <sstream>
#include <string>
#include <bits/stdc++.h>
 
using namespace std;
 
int main() {
  string str;
  cin >> str;
  int num = 0;
  int sum = 0;
  
  for (int i = 0; i < 3; i++) {
	  istringstream iss(str[i]);
      iss >> num;
	  sum = sum + num;
  }
  cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:35: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::ios_base::openmode' [-fpermissive]
   15 |           istringstream iss(str[i]);
      |                                   ^
      |                                   |
      |                                   __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from a.cc:2:
/usr/include/c++/14/sstream:597:46: note:   initializing argument 1 of 'std::__cxx11::basic_istringstream<_CharT, _Traits, _Alloc>::basic_istringstream(std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::ios_base::openmode = std::ios_base::openmode]'
  597 |       basic_istringstream(ios_base::openmode __mode)
      |                           ~~~~~~~~~~~~~~~~~~~^~~~~~
Language: C++

#include <iostream>
#include <sstream>
#include <string>
#include <bits/stdc++.h>
 
using namespace std;
 
int main() {
  string str;
  cin >> str;
  istringstream iss(str);
  int num = 0;
  int sum = 0;
  
  for (int i = 0; i < 3; i++) {
      iss[i] >> num;  
	  sum = sum + num;
  }
  cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: no match for 'operator[]' (operand types are 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} and 'int')
   16 |       iss[i] >> num;
      |          ^