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

#include <bits/stdc++.h>
using nameplace std;
 
int main() {
  int a,b,c,d;
  cin >> a;
  b = a % 100;
  a = a - 100*b 
  c = a % 10;
  a = a - 10*c
  d = a % 1;
  cout << b+c+d << endl;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nameplace'
    2 | using nameplace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> a;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:8:16: error: expected ';' before 'c'
    8 |   a = a - 100*b
      |                ^
      |                ;
    9 |   c = a % 10;
      |   ~             
a.cc:10:15: error: expected ';' before 'd'
   10 |   a = a - 10*c
      |               ^
      |               ;
   11 |   d = a % 1;
      |   ~            
a.cc:12:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |   cout << b+c+d << 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:12:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |   cout << b+c+d << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/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 nameplace std;
 
int main() {
  int a,b,c,d;
  cin >> a;
  b = a/100;
  c = a/10;
  d = a/1;
  cout << b+c+d << endl;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nameplace'
    2 | using nameplace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> a;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   cout << b+c+d << 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:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |   cout << b+c+d << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/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 nameplace std;

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nameplace'
    2 | using nameplace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> a;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   cout << b+c+d << 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:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |   cout << b+c+d << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/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 s, x;
  cin >> s ;
  
  x = s % 9
  
  cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'cout'
    8 |   x = s % 9
      |            ^
      |            ;
    9 | 
   10 |   cout << x << endl;
      |   ~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
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 s,x;
  cin >> s;
  x = 3 - s%3
  cout<< x <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before 'cout'
    7 |   x = 3 - s%3
      |              ^
      |              ;
    8 |   cout<< x <<endl;
      |   ~~~~
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scanner = new Scanner(System.in);
		int counter = 0;

		while(scanner.hasNextInt()) {
			if(scanner.nextInt() == 1) {
				counter++;
			}
		}

		System.out.println(counter);

	}

}


Compiler output:
Main.java:6: error: cannot find symbol
		Scanner scanner = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
		Scanner scanner = new Scanner(System.in);
		                      ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected ';' before 'c'
    7 |   b = a % 2
      |            ^
      |            ;
    8 |   c = a/10 % 2
      |   ~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define D_iN	200

int main (void) {
	int ii=0, iRetValue=0, iN=0, iA[D_iN], iCount=0;
	int	a=0, b=0, c=0;

	iRetValue = icanf ("%d", &iN);
	for (ii=0; ii < iN; ii++) {
		iRetValue = scanf ("%d", &iA[ii]);
	}

	while (1) {
		for (ii=0; ii < iN; ii++) {
			//c=a-(a/b)*b;
//			a = iA[ii] >> 1;	// /2
//			b = a << 1;			// x2
//			c = iA[ii] - b;		// 1 - 

			a = iA[ii] >> 1;	// /2
			c = iA[ii] - (a << 1);
			if (c == 0) {
				iA[ii] = a;
			} else {
				goto l_Exit;
			}
		}
		iCount++;
	}

l_Exit:
	printf ("%d\n", iCount);

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: 'icanf' was not declared in this scope; did you mean 'scanf'?
   11 |         iRetValue = icanf ("%d", &iN);
      |                     ^~~~~
      |                     scanf
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main (void) {
	int ii=0, iRetValue=0, iN=0, iCount=0;
	short	sA[200], sStp=0;

	iRetValue = scanf ("%d", &iN);
	for (ii=0; ii < iN; ii++) {
		iRetValue = scanf ("%d", &sA[ii]);
	}

	while (1) {
		for (ii=0; ii < iN; ii++) {
			if (sA[ii] % 2 == 0) {
				sA = sA[ii] >> 1;
			} else {
				ii = 200;
				sStp = 1;
			}
		}
		if (sStp) { break; }
		iCount++;
	}
	printf ("%d\n", iCount);

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:36: error: incompatible types in assignment of 'int' to 'short int [200]'
   17 |                                 sA = sA[ii] >> 1;
      |                                 ~~~^~~~~~~~~~~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main (void) {
	char s[16];
	int tama=0

	memset (&s[0], 0, sizeof (s));
	scanf ("%s%s%s", &s[0], &s[1], &s[2]);

	for (int ii=0; ii < 3; ii++) {
		if (s[ii] == '1') {
			tama++;
		}
	}

	printf ("%d", tama);

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected ',' or ';' before 'memset'
    9 |         memset (&s[0], 0, sizeof (s));
      |         ^~~~~~
Language: C++

#include <iostream>
using namespace std;


int main()
{
	string s;
	int a;
	cin >> s;
	int a = 0;
	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:10:13: error: redeclaration of 'int a'
   10 |         int a = 0;
      |             ^
a.cc:8:13: note: 'int a' previously declared here
    8 |         int a;
      |             ^
a.cc:23:35: error: expected '}' at end of input
   23 |                 cout << a << endl;
      |                                   ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include <iostream>
using namespace std;


int main()
{
	string s;
	int a;
	cin >> s;
int a = 0;
	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:10:5: error: redeclaration of 'int a'
   10 | int a = 0;
      |     ^
a.cc:8:13: note: 'int a' previously declared here
    8 |         int a;
      |             ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'int'
    6 |   int b = 0;
      |   ^~~
a.cc:7:10: error: 'a' was not declared in this scope
    7 |   cin >> a;
      |          ^
a.cc:9:5: error: 'b' was not declared in this scope
    9 |     b++;
      |     ^
a.cc:11:5: error: 'b' was not declared in this scope
   11 |     b++;
      |     ^
a.cc:13:9: error: 'b' was not declared in this scope
   13 |         b++;
      |         ^
a.cc:15:11: error: 'b' was not declared in this scope
   15 |   cout << b << endl;
      |           ^
Language: C++

#inciude<iostream>
using namespace std;
int main(){
  int s1,s2,s3;
  cin>>s1>>s2>>s3;
  int ans=0;
  if(s1==1){
    ans++;
  }
  if(s2==1){
    ans++;
  }
  if(s3==1){
    ans++;
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inciude; did you mean #include?
    1 | #inciude<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>s1>>s2>>s3;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inciude<iostream>
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout<<ans<<endl;
      |   ^~~~
a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:14: error: 'endl' was not declared in this scope
   16 |   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 | #inciude<iostream>
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
  int S1,S2,S3;
  cin>>S1>>S2>>S3;
  int ans=0;
  if(S1==1){
    ans++;
  }
  if(S2==1){
    ans++;
  }
  if(S3==1){
    ans++
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: expected ';' before '}' token
   15 |     ans++
      |          ^
      |          ;
   16 |   }
      |   ~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
  int S1,S2,S3;
  cin>>S1>>S2>>S3;
  int ans=0;
  if(S1==1){
    ans++;
  }
  if(S2==1){
    ans++;
  }
  if(S3==1){
    ans++
  }
  cout<<ans<<endl;
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: expected ';' before '}' token
   15 |     ans++
      |          ^
      |          ;
   16 |   }
      |   ~       
a.cc:18:12: error: expected '}' at end of input
   18 |   return 0;
      |            ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String s = sc.nextString();
		int counter = 0;
      	if (s[0] == "1") counter++;
      	if (s[1] == "1") counter++;
      	if (s[2] == "1") counter++;
      	System.out.printf(counter);
      
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		String s = sc.nextString();
		             ^
  symbol:   method nextString()
  location: variable sc of type Scanner
Main.java:8: error: array required, but String found
      	if (s[0] == "1") counter++;
      	     ^
Main.java:9: error: array required, but String found
      	if (s[1] == "1") counter++;
      	     ^
Main.java:10: error: array required, but String found
      	if (s[2] == "1") counter++;
      	     ^
Main.java:11: error: no suitable method found for printf(int)
      	System.out.printf(counter);
      	          ^
    method PrintStream.printf(String,Object...) is not applicable
      (argument mismatch; int cannot be converted to String)
    method PrintStream.printf(Locale,String,Object...) is not applicable
      (argument mismatch; int cannot be converted to Locale)
5 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String s = sc.nextInt();
		int counter = 0;
      	if (s[0] == "1") counter++;
      	if (s[1] == "1") counter++;
      	if (s[2] == "1") counter++;
      	System.out.printf(counter);
      
	}
}

Compiler output:
Main.java:6: error: incompatible types: int cannot be converted to String
		String s = sc.nextInt();
		                     ^
Main.java:8: error: array required, but String found
      	if (s[0] == "1") counter++;
      	     ^
Main.java:9: error: array required, but String found
      	if (s[1] == "1") counter++;
      	     ^
Main.java:10: error: array required, but String found
      	if (s[2] == "1") counter++;
      	     ^
Main.java:11: error: no suitable method found for printf(int)
      	System.out.printf(counter);
      	          ^
    method PrintStream.printf(String,Object...) is not applicable
      (argument mismatch; int cannot be converted to String)
    method PrintStream.printf(Locale,String,Object...) is not applicable
      (argument mismatch; int cannot be converted to Locale)
5 errors
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected initializer before '>>' token
    8 |   int s[i],cin>>s[i];
      |               ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected initializer before '>>' token
    8 |   int s[i],cin>>s;
      |               ^~
Language: C++

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

string a;
int ans;
for (i=0;i<3;i++){
  if ( string.at(i+1) == 1){
    ans ++;
  }
  i++
}
}

Compiler output:
a.cc:6:1: error: expected unqualified-id before 'for'
    6 | for (i=0;i<3;i++){
      | ^~~
a.cc:6:10: error: 'i' does not name a type
    6 | for (i=0;i<3;i++){
      |          ^
a.cc:6:14: error: 'i' does not name a type
    6 | for (i=0;i<3;i++){
      |              ^
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, a, b, c;
  cin >> N;
  a = N % 2
  b = {(N % 100) - a} / 10
  c = {N - (10 * b) - a} / 100
  cout << a + b + c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected ';' before 'b'
    7 |   a = N % 2
      |            ^
      |            ;
    8 |   b = {(N % 100) - a} / 10
      |   ~         
a.cc:8:23: error: expected primary-expression before '/' token
    8 |   b = {(N % 100) - a} / 10
      |                       ^
a.cc:9:26: error: expected primary-expression before '/' token
    9 |   c = {N - (10 * b) - a} / 100
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, a, b, c;
  cin >> N;
  a = N % 2;
  b = {(N % 100) - a} /; 10;
  c = {N - (10 * b) - a} /; 100;
  cout << a + b + c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before '/' token
    8 |   b = {(N % 100) - a} /; 10;
      |                      ^~
      |                      ;
a.cc:9:25: error: expected ';' before '/' token
    9 |   c = {N - (10 * b) - a} /; 100;
      |                         ^~
      |                         ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, a, b, c;
  cin >> N;
  a = N % 2;
  b = {(N % 100) - a}; / 10;
  c = {N - (10 * b) - a}; / 100;
  cout << a + b + c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected primary-expression before '/' token
    8 |   b = {(N % 100) - a}; / 10;
      |                        ^
a.cc:9:27: error: expected primary-expression before '/' token
    9 |   c = {N - (10 * b) - a}; / 100;
      |                           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, a, b, c;
  cin >> N;
  a = N % 2;
  b = {(N % 100) - a}/10;
  c = {N - (10 * b) - a}/100;
  cout << a + b + c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before '/' token
    8 |   b = {(N % 100) - a}/10;
      |                      ^
      |                      ;
a.cc:9:25: error: expected ';' before '/' token
    9 |   c = {N - (10 * b) - a}/100;
      |                         ^
      |                         ;
Language: C++

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

int main() {
  int N, a, b, c;
  cin >> N;
  a = N % 2;
  b = {(N % 100) - a} / 10;
  c = {N - (10 * b) - a} / 100;
  cout << a + b + c << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before '/' token
    8 |   b = {(N % 100) - a} / 10;
      |                      ^~
      |                      ;
a.cc:9:25: error: expected ';' before '/' token
    9 |   c = {N - (10 * b) - a} / 100;
      |                         ^~
      |                         ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int(){
  string s;
  cin>>s;
  int count;
  for(int i=0;i<s.size();i++){
    if(s.at(i)=='1'){
      count++;
    }
  }
  cout<<count<<endl;
}

Compiler output:
a.cc:3:5: error: expected unqualified-id before ')' token
    3 | int(){
      |     ^
Language: C++

#include<bits/stdc++>
using namespace std;
int(){
  string s;
  cin>>s;
  int count;
  for(int i=0;i<s.size();i++){
    if(s.at(i)=='1'){
      count++;
    }
  }
  cout<<count<<endl;
}

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

#include <stdio.h>

int main(){
  int a, b, c;
  scanf_s("%d %d %d", &a,&b,&c);
  printf("%d", a + b + c);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |   scanf_s("%d %d %d", &a,&b,&c);
      |   ^~~~~~~
      |   scanf
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> d;
      |   ^~~
a.cc:8:3: error: 'cout' was not declared in this scope
    8 |   cout << a + b + c << endl;
      |   ^~~~
a.cc:8:24: error: 'endl' was not declared in this scope
    8 |   cout << a + b + c << endl;
      |                        ^~~~
Language: C

#include <stdio.h>
int main(void) {
  int a, n;
  scanf("%d",&n);
  int seq[n];
  for(int i=0;i<n;i++){
    scanf("%d",&a);
    seq[i] = a;
  }
  int j = 0;
  int ans = 0;
  while(j==0){
    for(i=0;i<n;i++){
      if(seq[i]%2==0){
        seq[i]=seq[i]/2;
      }
      else{
        j=1;
      }
    }
    ans++;
  }
  printf("%d", ans);
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std
  
  int main(){
  string number;
  cin >> number;
  
  int count = 0;
  
  for(int i =0; i < 3; i++){
    if(number.at(i) = 0){
      count++;
    } 
  }
  
  cout << count << endl;

}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | 
    4 |   int main(){
      |   ~~~
Language: C++

#include<iostream>
using namespace std;

int N;
int A[210];

int main(){
  cin >> N;
  for (int i=0;i<N;++i) cin >> A[i];
  
  int res = 0;
  
  while(true){
    bool exists_odd = false;
    for (int i=0;i<N;++i){
      if (A[i]%2==1) exists_odd = true;
    }
    if (exits_odd) break;
    
    for (int i=0;i<N;++i) A[i] = A[i]/2;
    ++res;
  }
  cout << res << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'exits_odd' was not declared in this scope; did you mean 'exists_odd'?
   18 |     if (exits_odd) break;
      |         ^~~~~~~~~
      |         exists_odd
Language: C++

#include<iostream>
using namespace std;

int N;
int A[210];

int main(){
  cin >> N;
  for (i=0;i<N;++i) cin >> A[i];
  
  int res = 0;
  
  while(true){
    bool exists_odd = false;
    for (int i=0;i<N;++i){
      if (A[i]%2==1) exists_odd = true;
    }
    if (exits_odd) break;
    
    for (int i=0;i<N;++i) A[i] = A[i]/2;
    ++res;
  }
  cout << res << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'i' was not declared in this scope
    9 |   for (i=0;i<N;++i) cin >> A[i];
      |        ^
a.cc:18:9: error: 'exits_odd' was not declared in this scope; did you mean 'exists_odd'?
   18 |     if (exits_odd) break;
      |         ^~~~~~~~~
      |         exists_odd
Language: C++

#include<iostream>
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;
  return 0;
}

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") ++count;
a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if (s[1] == "1") ++count;
a.cc:10:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if (s[2] == "1") ++count;
Language: C++

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

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


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

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

int main(){
  string a;
  cin >> a;
  
  int c=0;
  string b;
  
  for(int i=0; i<3; i++){
    b=a[i];
    if(b ==　"1"){
      c++;
    }
  }
  
  cout << c << endl;
}
  
  
  


Compiler output:
a.cc:13:12: error: extended character 　 is not valid in an identifier
   13 |     if(b ==　"1"){
      |            ^
a.cc: In function 'int main()':
a.cc:13:12: error: '\U00003000' was not declared in this scope
   13 |     if(b ==　"1"){
      |            ^~
a.cc:13:14: error: expected ')' before string constant
   13 |     if(b ==　"1"){
      |       ~      ^~~
      |              )
Language: C++

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

int main(){
  string a;
  cin >> a;
  
  int c=0;
  string b;
  
  for(int i=0; i<3; i++){
    b=a[i]
    if(b ==　"1"){
      c++;
    }
  }
  
  cout << c << endl;
}
  
  
  


Compiler output:
a.cc:13:12: error: extended character 　 is not valid in an identifier
   13 |     if(b ==　"1"){
      |            ^
a.cc: In function 'int main()':
a.cc:12:11: error: expected ';' before 'if'
   12 |     b=a[i]
      |           ^
      |           ;
   13 |     if(b ==　"1"){
      |     ~~
Language: C++

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

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


Compiler output:
a.cc:11:15: error: extended character 　 is not valid in an identifier
   11 |     if(a[i] ==　"1"){
      |               ^
a.cc: In function 'int main()':
a.cc:11:15: error: '\U00003000' was not declared in this scope
   11 |     if(a[i] ==　"1"){
      |               ^~
a.cc:11:17: error: expected ')' before string constant
   11 |     if(a[i] ==　"1"){
      |       ~         ^~~
      |                 )
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: 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(){
  string a;
  cin >> a;
  
  int c=0;
  
  for(int i; i<3; i++){
    if(string[i]==1){
      c++;
    }
  }
  
  cout << c << endl;
}
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: expected unqualified-id before '[' token
   11 |     if(string[i]==1){
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string s;
  cin >> s;
  int counter = 0;
  for (int i = 0; i<3; i++){
    if(s[i]=="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[i]=="1"){
Language: C++

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

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

using namespace std;


main(){
  string s;
  cin << s;
  int counter = 0;
  for (int i = 0; i<3; i++){
    if(s[i]==1){
      counter++ ;
    }
    cout << counter << endl;
  }
  
    

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   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 | using namespace std;
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   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 | using namespace std;
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin << s;
      |          ^
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << counter << endl;
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:24: error: 'endl' was not declared in this scope
   12 |     cout << counter << endl;
      |                        ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:13:4: error: expected '}' at end of input
   13 |   }
      |    ^
a.cc:4:7: note: to match this '{'
    4 | main(){
      |       ^
Language: C++

#include <iostream>

using namespace std;

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

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

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'string' was not declared in this scope
    4 |         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 | using namespace std;
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         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 | using namespace std;
a.cc:5:16: error: 'S' was not declared in this scope
    5 |         cin >> S;
      |                ^
a.cc:14:9: error: 'cout' was not declared in this scope
   14 |         cout << ans << endl;
      |         ^~~~
a.cc:14:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:24: error: 'endl' was not declared in this scope
   14 |         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 | using namespace std;
Language: C++

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:3:3: error: 'string' was not declared in this scope
    3 |   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 | using namespace std;
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   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 | using namespace std;
a.cc:4:10: error: 's' was not declared in this scope
    4 |   cin >> s;
      |          ^
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout << counter << endl;
      |   ^~~~
a.cc:9:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:22: error: 'endl' was not declared in this scope
    9 |   cout << counter << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: lvalue required as left operand of assignment
    7 |   s1 + s2 + s3 = s4;
      |   ~~~~~~~~^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 's1' was not declared in this scope; did you mean 'y1'?
    6 |   cout << s1%2+s2%2+s3%2 << endl;
      |           ^~
      |           y1
a.cc:6:16: error: 's2' was not declared in this scope
    6 |   cout << s1%2+s2%2+s3%2 << endl;
      |                ^~
a.cc:6:21: error: 's3' was not declared in this scope
    6 |   cout << s1%2+s2%2+s3%2 << endl;
      |                     ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int s1,s2,s3;
  cin >> s1s2s3;
  cout << s1%2+s2%2+s3%2 << 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 <iostream>
#include <vector>

using namespace std;

int main() {
  //input
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i<n; i++){
    cin>>a[i];
  }
  
  //solve
  int ans;
  while(true){
    bool OK = true;
    for (int i = 0; i<n; i++){
      if (a[i] % 2 == 0){
        a[i] /= 2;
      }else{
        OK = false;
        break;
      }
    }
    if(OK){
      ans++
    }else{
      break;
    }
  }

  //output
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:12: error: expected ';' before '}' token
   28 |       ans++
      |            ^
      |            ;
   29 |     }else{
      |     ~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main() {
  //input
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i<n; i++){
    cin>>a[i]
  }
  
  //solve
  int ans;
  while(true){
    bool OK = true;
    for (int i = 0; i<n; i++){
      if (a[i] % 2 == 0){
        a[i] /= 2;
      }else{
        OK = false;
        break;
      }
    }
    if(OK){
      ans++
    }else{
      break;
    }
  }

  //output
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected ';' before '}' token
   12 |     cin>>a[i]
      |              ^
      |              ;
   13 |   }
      |   ~           
a.cc:28:12: error: expected ';' before '}' token
   28 |       ans++
      |            ^
      |            ;
   29 |     }else{
      |     ~
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:5: error: expected ',' or ';' before 'if'
    9 |     if (s[0] == '1') ++counter;
      |     ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string str;
  cin >> str ;
 
  for(int i=0; i < str.size(); i++) {
    int count =0;
    if(str[i] == '1'){
    
      count++;
    }  
    cout << count << endl;
  
}










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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string str;
  cin >> str >;
  int count=0 ;
  for(int i=0; i < str.size(); i++) {
    if(str.at(i) == 1){
      count++;
    }
    cout << count << endl;
  }
}








Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected primary-expression before ';' token
    6 |   cin >> str >;
      |               ^
Language: C++

#include<iostream>
using namespace std;

int N;
int A[210];

int main(){
  cin >> N;
  for (int i = 0; i < N; ++i) cin >> A[i];
  
  int res = 0;
  while(true){
    bool exist_odd = false;
    for (int i = 0; i < N; ++i){
      if (A[i] % 2 != 0) exist_odd = true;
    }
    
    if(exist_odd) break;
    
    for (int i = 0; i<N; ++i){
      A[i] /= 2
    }
    ++res;
  }
  
  cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: expected ';' before '}' token
   21 |       A[i] /= 2
      |                ^
      |                ;
   22 |     }
      |     ~
Language: C++

#include <istream>
using namespace;

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

Compiler output:
a.cc:2:16: error: expected identifier before ';' token
    2 | using namespace;
      |                ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:9:9: error: invalid types 'int[int]' for array subscript
    9 |     if(n[i]==1)count++;
      |         ^
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'count'?
   11 |   cout<<count<<endl;
      |   ^~~~
      |   count
a.cc:11:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   cout<<count<<endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/istream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <istream>
using namespace;

int main(){
  int n;
  cin>>n;
  int count=0;
  for(int i=0;i<3;i++){
    if(n.at(i)==1)count++;
  }
  cout<<count<<endl;
}

Compiler output:
a.cc:2:16: error: expected identifier before ';' token
    2 | using namespace;
      |                ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:9:10: error: request for member 'at' in 'n', which is of non-class type 'int'
    9 |     if(n.at(i)==1)count++;
      |          ^~
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'count'?
   11 |   cout<<count<<endl;
      |   ^~~~
      |   count
a.cc:11:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   cout<<count<<endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/istream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <istream>
using namespace;

int main(){
  int n;
  cin>>n;
  int count=0;
  for(int i=0;i<3;i++){
    if(n.at(i)==1)count++;
  }
}

Compiler output:
a.cc:2:16: error: expected identifier before ';' token
    2 | using namespace;
      |                ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:9:10: error: request for member 'at' in 'n', which is of non-class type 'int'
    9 |     if(n.at(i)==1)count++;
      |          ^~
Language: C++

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |             ans++;
      |             ^~~
      |             abs
a.cc:13:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |     cout << ans << endl;
      |             ^~~
      |             abs
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 - s1*100 - s2* 10;
  cout<<s1 + s2 + s3<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'int'
    7 |   cin>> s
      |          ^
      |          ;
    8 |   int s1= s / 100;
      |   ~~~     
a.cc:9:16: error: 's1' was not declared in this scope; did you mean 's2'?
    9 |   int s2= (s - s1 * 100) / 10;
      |                ^~
      |                s2
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 - s1*100 - s2* 10
  cout<<s1 + s2 + s3<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'int'
    7 |   cin>> s
      |          ^
      |          ;
    8 |   int s1= s / 100;
      |   ~~~     
a.cc:9:16: error: 's1' was not declared in this scope; did you mean 's2'?
    9 |   int s2= (s - s1 * 100) / 10;
      |                ^~
      |                s2
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A  
  int B 
  int C;
  
  cin >> A >> B >> C ;
  cout << A+B+C <<endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'int'
    6 |   int B
      |   ^~~
a.cc:9:10: error: 'A' was not declared in this scope
    9 |   cin >> A >> B >> C ;
      |          ^
a.cc:9:15: error: 'B' was not declared in this scope
    9 |   cin >> A >> B >> C ;
      |               ^
a.cc:9:20: error: 'C' was not declared in this scope
    9 |   cin >> A >> B >> C ;
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A  int B int C;
  
  cin >> A >> B  >> C ;
  cout << A+B+C <<endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected initializer before 'int'
    5 |   int A  int B int C;
      |          ^~~
a.cc:7:10: error: 'A' was not declared in this scope
    7 |   cin >> A >> B  >> C ;
      |          ^
a.cc:7:15: error: 'B' was not declared in this scope
    7 |   cin >> A >> B  >> C ;
      |               ^
a.cc:7:21: error: 'C' was not declared in this scope
    7 |   cin >> A >> B  >> C ;
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int "S1" int "S2" int "S3";
  
  cin >> S1 >> S2 >> S3;
  cout << S1+S2+S3 <<endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before string constant
    5 |   int "S1" int "S2" int "S3";
      |       ^~~~
a.cc:7:10: error: 'S1' was not declared in this scope; did you mean 'y1'?
    7 |   cin >> S1 >> S2 >> S3;
      |          ^~
      |          y1
a.cc:7:16: error: 'S2' was not declared in this scope
    7 |   cin >> S1 >> S2 >> S3;
      |                ^~
a.cc:7:22: error: 'S3' was not declared in this scope
    7 |   cin >> S1 >> S2 >> S3;
      |                      ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before string constant
    5 |   int "S1" int "S2" int "S3";
      |       ^~~~
a.cc:7:10: error: 's1' was not declared in this scope; did you mean 'y1'?
    7 |   cin >> s1 >> s2 >> s3;
      |          ^~
      |          y1
a.cc:7:16: error: 's2' was not declared in this scope
    7 |   cin >> s1 >> s2 >> s3;
      |                ^~
a.cc:7:22: error: 's3' was not declared in this scope
    7 |   cin >> s1 >> s2 >> s3;
      |                      ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected unqualified-id before string constant
    5 |   int "s1" int "s2" int "s3";
      |       ^~~~
a.cc:7:10: error: 's1' was not declared in this scope; did you mean 'y1'?
    7 |   cin >> s1 >> s2 >> s3;
      |          ^~
      |          y1
a.cc:7:16: error: 's2' was not declared in this scope
    7 |   cin >> s1 >> s2 >> s3;
      |                ^~
a.cc:7:22: error: 's3' was not declared in this scope
    7 |   cin >> s1 >> s2 >> s3;
      |                      ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected initializer before 'int'
    5 |   int s1 int s2 int s3;
      |          ^~~
a.cc:6:10: error: 's1' was not declared in this scope; did you mean 'y1'?
    6 |   cin >> s1 >> s2 >> s3;
      |          ^~
      |          y1
a.cc:6:16: error: 's2' was not declared in this scope
    6 |   cin >> s1 >> s2 >> s3;
      |                ^~
a.cc:6:22: error: 's3' was not declared in this scope
    6 |   cin >> s1 >> s2 >> s3;
      |                      ^~
Language: C++

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

int main(){
    string S;
    int >> S;
    int ans = 0;
    for(int i = 0; i < S[i]; i++){
        for(S[i] == '1'){
            ans++;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected unqualified-id before '>>' token
    6 |     int >> S;
      |         ^~
a.cc:9:24: error: expected ';' before ')' token
    9 |         for(S[i] == '1'){
      |                        ^
      |                        ;
a.cc:12:5: error: expected primary-expression before '}' token
   12 |     }
      |     ^
a.cc:11:10: error: expected ';' before '}' token
   11 |         }
      |          ^
      |          ;
   12 |     }
      |     ~     
a.cc:12:5: error: expected primary-expression before '}' token
   12 |     }
      |     ^
a.cc:11:10: error: expected ')' before '}' token
   11 |         }
      |          ^
      |          )
   12 |     }
      |     ~     
a.cc:9:12: note: to match this '('
    9 |         for(S[i] == '1'){
      |            ^
a.cc:12:5: error: expected primary-expression before '}' token
   12 |     }
      |     ^
Language: C++

int main()
{

	char s[4];
	int cnt;
	scanf("%s", s,3);
	cnt = 0;

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

	printf("%d", cnt);

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'scanf' was not declared in this scope
    6 |         scanf("%s", s,3);
      |         ^~~~~
a.cc:19:9: error: 'printf' was not declared in this scope
   19 |         printf("%d", cnt);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()