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

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

int main() {
  int X→1 , Y→0;
  
  cin >> X >> Y;
  
  cout << X*1+Y*1 << endl;
}


Compiler output:
a.cc:5:7: error: extended character → is not valid in an identifier
    5 |   int X→1 , Y→0;
      |       ^
a.cc:5:13: error: extended character → is not valid in an identifier
    5 |   int X→1 , Y→0;
      |             ^
a.cc: In function 'int main()':
a.cc:7:10: error: 'X' was not declared in this scope
    7 |   cin >> X >> Y;
      |          ^
a.cc:7:15: error: 'Y' was not declared in this scope
    7 |   cin >> X >> Y;
      |               ^
Language: C++

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

int main() {
  string 1;
  int X;
  
  cin >> X;
  
  cout << X*1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected unqualified-id before numeric constant
    5 |   string 1;
      |          ^
Language: C++

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

int main() {
  string 0,1;
  int X;
  
  cin >> 0 >> 1;
  cin >> X;
  
  cout << X*1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected unqualified-id before numeric constant
    5 |   string 0,1;
      |          ^
a.cc:8:7: error: ambiguous overload for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
    8 |   cin >> 0 >> 1;
      |   ~~~ ^~ ~
      |   |      |
      |   |      int
      |   std::istream {aka std::basic_istream<char>}
In file included 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,
                 from a.cc:1:
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
  122 |       operator>>(__istream_type& (*__pf)(__istream_type&))
      |       ^~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
  126 |       operator>>(__ios_type& (*__pf)(__ios_type&))
      |       ^~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
  133 |       operator>>(ios_base& (*__pf)(ios_base&))
      |       ^~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
  352 |       operator>>(__streambuf_type* __sb);
      |       ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*) [with _Traits = char_traits<char>]'
  939 |     operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
      |     ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*) [with _Traits = char_traits<char>]'
  945 |     operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
      |     ^~~~~~~~
Language: C++

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

int main()
{
  int count;
  string s;
  cin>> s;
  int i;
  for(i= 0;i<2;i++);
  if(s.at(i)=="1")count++;
  cout<< count<< 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(s.at(i)=="1")count++;
      |      ~~~~~~~^~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i= 0;i<2;i++);
      |       ^
a.cc:10:11: error: 'i' was not declared in this scope
   10 |   if(s.at(i)=="1")count++;
      |           ^
Language: C++

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

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

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

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

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

Compiler output:
a.cc:2:17: error: 'name' is not a namespace-name
    2 | using namespace name;
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << (s[0] - '0')+(s[1]-'0')+(s[2]-'0') << 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:7:49: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << (s[0] - '0')+(s[1]-'0')+(s[2]-'0') << 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() {
  string a;
  cin >> a;
  int c = 0;
  for (int i = 0;i < 3;i++) {
    if (a.at(i) == '0')
      c++
  }
  cout << c << endl;
}
  

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

#include <iostream>
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:27: error: expected ';' before 'cout'
    6 |         cin >> a >> b >> c
      |                           ^
      |                           ;
    7 |         cout << a + b + c << endl;
      |         ~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string s;
  int ans;
  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:22: error: expected ';' before '}' token
    8 |   if(s[0]=='1'){ans++}
      |                      ^
      |                      ;
a.cc:9:22: error: expected ';' before '}' token
    9 |   if(s[1]=='1'){ans++}
      |                      ^
      |                      ;
a.cc:10:22: error: expected ';' before '}' token
   10 |   if(s[2]=='1'){ans++}
      |                      ^
      |                      ;
Language: C++

#include <iostream>
using namespace std;
int main(){
  string s;
  int ans;
  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:7:22: error: expected ';' before '}' token
    7 |   if(s[0]=='1'){ans++}
      |                      ^
      |                      ;
a.cc:8:22: error: expected ';' before '}' token
    8 |   if(s[1]=='1'){ans++}
      |                      ^
      |                      ;
a.cc:9:22: error: expected ';' before '}' token
    9 |   if(s[2]=='1'){ans++}
      |                      ^
      |                      ;
Language: Java

import java.util.Scanner;

public class abc081_a {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        int s1 = scanner.nextInt();
        int s2 = scanner.nextInt();
        int s3 = scanner.nextInt();
        int result = 0;
        if(s1 == 1){
            result += 1;
        }
        if(s2 == 1){
            result += 1;
        }
        if(s3 == 1){
            result += 1;
        }

        System.out.println(result);

    }
}

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

import java.util.*;

public class Main {
	Scanner sc = new Scanner(System.in);
	String s = sc.next();
	int i = Integer.parseInt(s);
	int n = 0;
	for(int j = 1; j <= 100;j = 10 * j) {
		if((i / j) % 2 == 0) { 
			
		}else {
			n = n + 1;
		}
	}
	System.out.println(n);
}

Compiler output:
Main.java:8: error: illegal start of type
	for(int j = 1; j <= 100;j = 10 * j) {
	^
Main.java:8: error: <identifier> expected
	for(int j = 1; j <= 100;j = 10 * j) {
	                ^
Main.java:8: error: <identifier> expected
	for(int j = 1; j <= 100;j = 10 * j) {
	                         ^
Main.java:8: error: ';' expected
	for(int j = 1; j <= 100;j = 10 * j) {
	                                  ^
Main.java:15: error: <identifier> expected
	System.out.println(n);
	                  ^
Main.java:15: error: <identifier> expected
	System.out.println(n);
	                    ^
6 errors
Language: C

#include <stdio.h>
int main()
{
  int i,j,k,count;
  scanf("%d %d %d",i,j,k);
  if(i == 1){
    count++
  } else if (j == 1){
    count++
  } else if (k == 1){
    count++
  }

  printf("%d",count);

  return 0;
  
}

Compiler output:
main.c: In function 'main':
main.c:7:12: error: expected ';' before '}' token
    7 |     count++
      |            ^
      |            ;
    8 |   } else if (j == 1){
      |   ~         
main.c:9:12: error: expected ';' before '}' token
    9 |     count++
      |            ^
      |            ;
   10 |   } else if (k == 1){
      |   ~         
main.c:11:12: error: expected ';' before '}' token
   11 |     count++
      |            ^
      |            ;
   12 |   }
      |   ~
Language: C++

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

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

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

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

int main() {	
  int s1s2s3, i;
  cin >> s1s2s3;
  if(s1s2s3=111){
   i = 3; 
  }else if(s1s2s3=101 || s1s2s3=110 || s1s2s3=011){
   i = 2; 
  }else if(s1s2s3 = 000){
   i = 0; 
  }else{
    i = 1;
  }
  cout << i << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:37: error: lvalue required as left operand of assignment
    9 |   }else if(s1s2s3=101 || s1s2s3=110 || s1s2s3=011){
      |                                 ~~~~^~~~~~~~~
Language: C++

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

int main(){
	string str;
  	cin >> str;
  	int cnt;
  	for(int i=0; i<3; ++i){
      if(str[i]=='1')	cnt++;
      else continue
    }
  	cout << cnt;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before '}' token
   11 |       else continue
      |                    ^
      |                    ;
   12 |     }
      |     ~
Language: C++

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

int main(){
	string str;
  	cin >> str;
  	int cnt;
  	for(int i=0; i<(int)str.size; ++i){
      if(str[i]=='1')	cnt++;
      else continue
    }
  	cout << cnt;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:33: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |         for(int i=0; i<(int)str.size; ++i){
      |                             ~~~~^~~~
      |                                     ()
a.cc:11:20: error: expected ';' before '}' token
   11 |       else continue
      |                    ^
      |                    ;
   12 |     }
      |     ~
Language: C++

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

int main(){
	string str;
  	cin >> str;
  	int cnt;
  	for(int i=0; i<(int)str.size; ++i){
      if(S[i]=='1')	cnt++;
      else continue
    }
  	cout << cnt;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:33: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |         for(int i=0; i<(int)str.size; ++i){
      |                             ~~~~^~~~
      |                                     ()
a.cc:10:10: error: 'S' was not declared in this scope
   10 |       if(S[i]=='1')     cnt++;
      |          ^
a.cc:11:20: error: expected ';' before '}' token
   11 |       else continue
      |                    ^
      |                    ;
   12 |     }
      |     ~
Language: C++

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

int main(){
	string str;
  	cin >> str;
  	int cnt;
  	for(int i=0; i<(int)S.size; ++i){
      if(S[i]=='1')	cnt++;
      else continue
    }
  	cout << cnt;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: 'S' was not declared in this scope
    9 |         for(int i=0; i<(int)S.size; ++i){
      |                             ^
a.cc:11:20: error: expected ';' before '}' token
   11 |       else continue
      |                    ^
      |                    ;
   12 |     }
      |     ~
Language: C

#include<stdio.h>

in main()
{
  int a,b,c,d;
  d=0;
  scanf("%d%d%d",&a,&b,&c);
  if(a==1)
    d++;
  if(b==1)
    d++;
  if(c==1)
    d++;
  printf("%d",&d);
  
  return 0;
}

Compiler output:
main.c:3:1: error: unknown type name 'in'; did you mean 'int'?
    3 | in main()
      | ^~
      | int
Language: C++

#include <cmath>
using namespace std;

int main()
{
  int a,count=0;
  cin>>a;
  if(a%10==1)count++;
  if(a/10%10==1)count++;
  if(a/10/10%10==1)count++;
  cout<<count;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin>>a;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cmath>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout<<count;
      |   ^~~~
a.cc:11:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
    
      Scanner sn = new Scanner(System.in);
      
      String s = next();
      
      s = s.replaceAll("0","");
      System.out.println("s.length()");
      
    }
}


Compiler output:
Main.java:7: error: cannot find symbol
      String s = next();
                 ^
  symbol:   method next()
  location: class Main
1 error
Language: Java

import java.util.*;
public class Main{
	public static void main{
    
      Scanner sn = new Scanner(System.in);
      
      String s = next();
      
      s = s.replaceAll("0","");
      System.out.println("s.length()");
      
    }
}

Compiler output:
Main.java:3: error: '(' expected
	public static void main{
	                       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
bool is_proper(unsigned int in);
int main() {
  unsigned int a, b, c;
  cin >> a >> b >> c;
  while(!is_proper(a) || !is_proper(b) !is_proper(c)){
    cin >> a >> b >> c;
  }
  cout << a+b+c << endl;
}

bool is_proper(unsigned int in){
  if (in==1 || in==0){
    return true;
  }
  return false;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:39: error: expected ')' before '!' token
    7 |   while(!is_proper(a) || !is_proper(b) !is_proper(c)){
      |        ~                              ^~
      |                                       )
a.cc:7:53: error: expected ';' before ')' token
    7 |   while(!is_proper(a) || !is_proper(b) !is_proper(c)){
      |                                                     ^
      |                                                     ;
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
  	
    Scanner sc = new Scanner(Syetem.in);
    
    String s = sc.next();
    //0を消す
    
    s = s.replaceAll("0","");
    System.out.println(s.length());
   
  }
}


Compiler output:
Main.java:6: error: cannot find symbol
    Scanner sc = new Scanner(Syetem.in);
                             ^
  symbol:   variable Syetem
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
  	
    Scanner sc = new Scanner(Syetem.in);
    
    int s = sc.next();
    //0を消す
    
    s = s.replaceAll("0","");
    System.out.println(s.length());
   
  }
}


Compiler output:
Main.java:6: error: cannot find symbol
    Scanner sc = new Scanner(Syetem.in);
                             ^
  symbol:   variable Syetem
  location: class Main
Main.java:8: error: incompatible types: String cannot be converted to int
    int s = sc.next();
                   ^
Main.java:11: error: int cannot be dereferenced
    s = s.replaceAll("0","");
         ^
Main.java:12: error: int cannot be dereferenced
    System.out.println(s.length());
                        ^
4 errors
Language: Java

import java.util.*;

public class Main{
  public static void main (String[] args){
  	
    Scanner sc = new Scanner(Syetem.in);
    
    int s = sc.next();
    //0を消す
    
    s = s.replaceAll("0","");
    System.out.println(s.length());
   
  }
}

Compiler output:
Main.java:6: error: cannot find symbol
    Scanner sc = new Scanner(Syetem.in);
                             ^
  symbol:   variable Syetem
  location: class Main
Main.java:8: error: incompatible types: String cannot be converted to int
    int s = sc.next();
                   ^
Main.java:11: error: int cannot be dereferenced
    s = s.replaceAll("0","");
         ^
Main.java:12: error: int cannot be dereferenced
    System.out.println(s.length());
                        ^
4 errors
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] arg){
    
     Scanner sc = new Scanner(System.in);
     String s = sc.next();
     s = s.replaceAll("0","");
     System.out.println(s.length())
    }

}

Compiler output:
Main.java:9: error: ';' expected
     System.out.println(s.length())
                                   ^
1 error
Language: C++

s = input()
cnt = 0
if s[0] =='1':
    cnt +=1
if s[1] == '1':
    cnt += 1
if s[2] == '1':
    cnt += 1
print(cnt)

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int  main (){
  int a,n;
  int b=0;
  cin>>a;
  for(int i=0;i<3;i++){
    n[i]=a%10;
    a=a/10;
  }
  for(int i=0;i<3;i++){
    if(n[i]==1){
      b++;
    }
  }
  cout<<b<<"\n";
  return(0);
}
#include<bits/stdc++.h>
using namespace std;
int  main (){
  int a,n;
  int b=0;
  cin>>a;
  for(int i=0;i<3;i++){
    n[i]=a%10;
    a=a/10;
  }
  for(int i=0;i<3;i++){
    if(n[i]==1){
      b++;
    }
  }
  cout<<b<<"\n";
  return(0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: invalid types 'int[int]' for array subscript
    8 |     n[i]=a%10;
      |      ^
a.cc:12:9: error: invalid types 'int[int]' for array subscript
   12 |     if(n[i]==1){
      |         ^
a.cc: At global scope:
a.cc:21:6: error: redefinition of 'int main()'
   21 | int  main (){
      |      ^~~~
a.cc:3:6: note: 'int main()' previously defined here
    3 | int  main (){
      |      ^~~~
a.cc: In function 'int main()':
a.cc:26:6: error: invalid types 'int[int]' for array subscript
   26 |     n[i]=a%10;
      |      ^
a.cc:30:9: error: invalid types 'int[int]' for array subscript
   30 |     if(n[i]==1){
      |         ^
Language: Java

import java.util.Scanner;
 class Main {
   public static void main(String[] args) {
     Scanner sc = new Scanner(System.in);
     String number = sc.next();
     number = number.replaceAll("0","");
     System.out.println(number.length);
   }
 }

Compiler output:
Main.java:7: error: cannot find symbol
     System.out.println(number.length);
                              ^
  symbol:   variable length
  location: variable number of type String
1 error
Language: Java

import java.util.Scanner;
 class Main {
   public static void main(String[] args) {
     Scanner sc = new Scanner(System.in);
     int number = sc.nextInt();
     number = number.replaceAll("0","");
     System.out.println(number.length);
   }
 }

Compiler output:
Main.java:6: error: int cannot be dereferenced
     number = number.replaceAll("0","");
                    ^
Main.java:7: error: int cannot be dereferenced
     System.out.println(number.length);
                              ^
2 errors
Language: Java

import java.util.Scanner;
 class Main {
   public static void main(String[] args) {
     Scanner sc = new Scanner(System.in);
     int number = sc.nextInt();
     number = number.replaceAll("0","");
     System.out.println(number.length());
   }
 }

Compiler output:
Main.java:6: error: int cannot be dereferenced
     number = number.replaceAll("0","");
                    ^
Main.java:7: error: int cannot be dereferenced
     System.out.println(number.length());
                              ^
2 errors
Language: Java

import java.utill.Scanner;
 class Main {
   public static void main(String[] args) {
     Scanner sc = new Scanner(System.in);
     int number = sc.nextInt();
     number = number.replaceAll("0","");
     System.out.println(number.length);
   }
 }

Compiler output:
Main.java:1: error: package java.utill does not exist
import java.utill.Scanner;
                 ^
Main.java:4: error: cannot find symbol
     Scanner sc = new Scanner(System.in);
     ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
     Scanner sc = new Scanner(System.in);
                      ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: int cannot be dereferenced
     number = number.replaceAll("0","");
                    ^
Main.java:7: error: int cannot be dereferenced
     System.out.println(number.length);
                              ^
5 errors
Language: C

#include<stdio.h>
int main(){
    string s[2];
    int i,counter=0;
 
    scanf("%s", s );
    for(i=0; i<2;i++){
        if(s[i] == '1'){
            counter++;
        }

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

Compiler output:
main.c: In function 'main':
main.c:3:5: error: unknown type name 'string'; did you mean 'stdin'?
    3 |     string s[2];
      |     ^~~~~~
      |     stdin
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  int N, x, count=0;
  double sum=0;
  cin >> N;
  for(int i=0;i<N;i++)
  {
    cin >> x;
    sum+=x;
  }
  for(int j=0;j<30;j++)
  {
    if((2*sum/2)%2==0)
    {
      count++;
      sum/=2.0;
    }
    else
      break;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   16 |     if((2*sum/2)%2==0)
      |        ~~~~~~~~~^~
      |              |   |
      |              |   int
      |              double
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected primary-expression before '<<' token
    9 |   cout << c; << endl;
      |              ^~
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:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |  if(s[0] =="1") ans++;
a.cc:9:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |  if(s[1] == "1") ans++;
a.cc:10:10: 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 >>s1 >> s2 >> s3 >>;
  cout << s1 + s2 + s3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:26: error: expected primary-expression before ';' token
    5 |   cin >>s1 >> s2 >> s3 >>;
      |                          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a,b,c;
int count=0;
int main(){
/*  cin>>a>>b>>c;
  if(a==1)count++;
  if(b==1)count++;
  if(c==1)count++;*/
  cout<<count<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: reference to 'count' is ambiguous
   10 |   cout<<count<<endl;
      |         ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:4:5: note:                 'int count'
    4 | int count=0;
      |     ^~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define REP(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) REP((i),0,(n))
#define ALL(v) (v).begin(),(v).end()

int main() {
string text;
  cin>>text;
  int count=0;
  rep(i,3){
    if(text.at(i)=='1')count++;
}
  cout<<count<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: expected '}' at end of input
   14 |   cout<<count<<endl;
      |                     ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define REP(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) REP((i),0,(n))
#define ALL(v) (v).begin(),(v).end()

int main() {
string text;
  cin>>text;
  int count=0;
  rep(i,text.size()){
    if(text.at(i)=='1')count++;
}
  cout<<count<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: expected '}' at end of input
   14 |   cout<<count<<endl;
      |                     ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
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;
  return 0;
}

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

int main(int argc, const char * argv[]) {
    // insert code here...
    std::string s;
    std::cin >> s;
    std::cout << s << std::endl;
    int cnt = 0;
    if(s[0] == '1'){
        cnt++;
    }
    if(s[1] == '1'){
        cnt++;
    }
    if(s[2] == '1'){
        cnt++;
    }
    std::cout << cnt;
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:3:10: error: 'string' is not a member of 'std'
    3 |     std::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 | int main(int argc, const char * argv[]) {
a.cc:4:10: error: 'cin' is not a member of 'std'
    4 |     std::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 | int main(int argc, const char * argv[]) {
a.cc:4:17: error: 's' was not declared in this scope
    4 |     std::cin >> s;
      |                 ^
a.cc:5:10: error: 'cout' is not a member of 'std'
    5 |     std::cout << s << std::endl;
      |          ^~~~
a.cc:5:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:5:28: error: 'endl' is not a member of 'std'
    5 |     std::cout << s << std::endl;
      |                            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main(int argc, const char * argv[]) {
a.cc:16:10: error: 'cout' is not a member of 'std'
   16 |     std::cout << cnt;
      |          ^~~~
a.cc:16:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

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

#inclde<stdio.h>
 
int main(void) {
  int s1, s2, s3, d;
  
  scanf("%1d%1d%1d", &s1, &s2, &s3);
  
  if(s1 == 1) {
    d++;
  }
  if(s3 == 1) {
    d++;
  }
  if(s2 == 1) {
   	d++;
  }
  
  printf("%d", d);
  
  return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inclde; did you mean #include?
    1 | #inclde<stdio.h>
      |  ^~~~~~
      |  include
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%1d%1d%1d", &s1, &s2, &s3);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inclde<stdio.h>
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%1d%1d%1d", &s1, &s2, &s3);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |   printf("%d", d);
      |   ^~~~~~
main.c:18:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#inclde<stdio.h>
 
int main(void) {
  unsigned long long int s1, s2, s3, d;
  
  scanf("%1lx%1lx%1lx", &s1, &s2, &s3);
  
  if(s1 == 1) {
    d++;
  }
  if(s3 == 1) {
    d++;
  }
  if(s2 == 1) {
   	d++;
  }
  
  printf("%lx", d);
  
  return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inclde; did you mean #include?
    1 | #inclde<stdio.h>
      |  ^~~~~~
      |  include
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%1lx%1lx%1lx", &s1, &s2, &s3);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inclde<stdio.h>
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%1lx%1lx%1lx", &s1, &s2, &s3);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |   printf("%lx", d);
      |   ^~~~~~
main.c:18:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#inclde<stdio.h>
 
int main(void) {
  unsigned long long int s1, s2, s3, d;
  
  scanf("%1d%1d%1d", &s1, &s2, &s3);
  
  if(s1 == 1) {
    d++;
  }
  if(s3 == 1) {
    d++;
  }
  if(s2 == 1) {
   	d++;
  }
  
  printf("%d", d);
  
  return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inclde; did you mean #include?
    1 | #inclde<stdio.h>
      |  ^~~~~~
      |  include
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%1d%1d%1d", &s1, &s2, &s3);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inclde<stdio.h>
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%1d%1d%1d", &s1, &s2, &s3);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |   printf("%d", d);
      |   ^~~~~~
main.c:18:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#inclde<stdio.h>

#define u unsigned long long int;

int main(void) {
  u s1, s2, s3, d;
  
  scanf("%1d%1d%1d", &s1, &s2, &s3);
  
  if(s1 == 1) {
    d++;
  }
  if(s3 == 1) {
    d++;
  }
  if(s2 == 1) {
   	d++;
  }
  
  printf("%d", d);
  
  return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inclde; did you mean #include?
    1 | #inclde<stdio.h>
      |  ^~~~~~
      |  include
main.c: In function 'main':
main.c:6:3: warning: useless type name in empty declaration
    6 |   u s1, s2, s3, d;
      |   ^
main.c:6:5: error: 's1' undeclared (first use in this function)
    6 |   u s1, s2, s3, d;
      |     ^~
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:9: error: 's2' undeclared (first use in this function)
    6 |   u s1, s2, s3, d;
      |         ^~
main.c:6:13: error: 's3' undeclared (first use in this function)
    6 |   u s1, s2, s3, d;
      |             ^~
main.c:6:17: error: 'd' undeclared (first use in this function)
    6 |   u s1, s2, s3, d;
      |                 ^
main.c:8:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |   scanf("%1d%1d%1d", &s1, &s2, &s3);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inclde<stdio.h>
main.c:8:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |   scanf("%1d%1d%1d", &s1, &s2, &s3);
      |   ^~~~~
main.c:8:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:20:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   20 |   printf("%d", d);
      |   ^~~~~~
main.c:20:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'a' was not declared in this scope
    7 |   a = s / 100;
      |   ^
a.cc:9:3: error: 'b' was not declared in this scope
    9 |   b = s /10;
      |   ^
a.cc:11:3: error: 'c' was not declared in this scope
   11 |   c = s;
      |   ^
Language: C++

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


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

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


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

import java.util.*;
 
public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] nums = new int[N + 1];
        for (int i = 0; i < N; i++) {
        	nums[i] = sc.nextInt();
        }
        
        int count = 0;
        while (isAllOdd(nums)) {
        	for (int i = 0; i < N; i++) {
            	nums[i] = nums[i] / 2;
            }
            ++count;
        }
        System.out.println(count);
    }
  
    private boolean isAllOdd(int[] nums) {
    	for (int i = 0; i < nums.length; i++) {
        	if (nums[i] % 2 != 0) {
            	return false;
            } 
        }
        return true;
    }
}

Compiler output:
Main.java:13: error: non-static method isAllOdd(int[]) cannot be referenced from a static context
        while (isAllOdd(nums)) {
               ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n;
  cin>>n;
  for(int i=0;i<n;i++){
    int a,b,c;
    cin>>a;
    b=0;
    c=0;
    while(true){
      c=a/2;
      if(c%2 == 0)
        b++;
      else
        break;
    }
    int max['i'];
    max[i] = b;
  }
  int max;
  max=max[i];
  for(int i=0;i<n;i++){
    if(max[i]<max[i+1])
      max=max[i+1];
  }
  cout<<max<<endl;
  

  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:11: error: 'i' was not declared in this scope
   23 |   max=max[i];
      |           ^
a.cc:25:11: error: invalid types 'int[int]' for array subscript
   25 |     if(max[i]<max[i+1])
      |           ^
a.cc:25:18: error: invalid types 'int[int]' for array subscript
   25 |     if(max[i]<max[i+1])
      |                  ^
a.cc:26:14: error: invalid types 'int[int]' for array subscript
   26 |       max=max[i+1];
      |              ^
Language: C++

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


Compiler output:
a.cc:6:10: error: extended character 　 is not valid in an identifier
    6 |   cout <<　s₁+s₂+s₃ << endl;
      |          ^
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:10: error: '\U00003000s\U00002081' was not declared in this scope; did you mean 's₁'?
    6 |   cout <<　s₁+s₂+s₃ << endl;
      |          ^~~~
      |          s₁
Language: C++

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int a,b;
  a=0;
  cin>>b;
  for(int i=0;i<2;i++){
    
    if(b.at(i)==1)
      a++;
  }
  cout<<a<<endl;
  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: request for member 'at' in 'b', which is of non-class type 'int'
   10 |     if(b.at(i)==1)
      |          ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int a;
  a=0;
  for(int i=0;i<2;i++){
    int b;
    cin >>b;
    if(b==1)
      a++
  }
  cout<<a<<endl;
  

}


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

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

int main() {
int sss;
int s1;
int s2;
int s3;
cin >> sss;
s1 = sss/100
s2 = sss/10-s1*10
s3 = sss-s1*100-s2*10
cout << s1+s2+s3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected ';' before 's2'
   10 | s1 = sss/100
      |             ^
      |             ;
   11 | s2 = sss/10-s1*10
      | ~~
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() {
  char s[2];
  cin >> s ;


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

  




Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: expected ';' before ')' token
   10 | for( int i = 0 ; i < 3 , i ++)  {
      |                              ^
      |                              ;
Language: C++

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

int main() {
  char s[2];
  cin >> s ;


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

  




Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: expected ';' before '==' token
   10 | for( int i == 0 ; i < 3 ; i ++)  {
      |           ^~~
      |           ;
a.cc:10:12: error: expected primary-expression before '==' token
   10 | for( int i == 0 ; i < 3 ; i ++)  {
      |            ^~
a.cc:10:24: error: expected ')' before ';' token
   10 | for( int i == 0 ; i < 3 ; i ++)  {
      |    ~                   ^~
      |                        )
a.cc:10:27: error: 'i' was not declared in this scope
   10 | for( int i == 0 ; i < 3 ; i ++)  {
      |                           ^
Language: C++

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

int main() {
  char s[2];
  cin >> s ;


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

  




Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: declaration does not declare anything [-fpermissive]
   10 | for( int ;i == 0 ;i ++)  {
      |      ^~~
a.cc:10:11: error: 'i' was not declared in this scope
   10 | for( int ;i == 0 ;i ++)  {
      |           ^
Language: C++

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

int main() {
  char s1,s2,s3;
  cin >>s1 >>s2 >>s3 ;


  int count = 0;
  {
  s1 == '1';
   s2 == '1';
    s3 == '1'
  
    count++;
  }
  cout << count << endl;
}

  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: expected ';' before 'count'
   13 |     s3 == '1'
      |              ^
      |              ;
   14 | 
   15 |     count++;
      |     ~~~~~     
a.cc: At global scope:
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

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

int main() {
  int s1;
  cin >> s;
  cout << s1%2 + (s1%100)%10 + (s1/100) << endl;
}

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

#include <stdio.h>

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:
main.c: In function 'main':
main.c:4:5: error: unknown type name 'string'; did you mean 'stdin'?
    4 |     string s;
      |     ^~~~~~
      |     stdin
main.c:5:5: error: 'cin' undeclared (first use in this function)
    5 |     cin >> s;
      |     ^~~
main.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:10: error: subscripted value is neither array nor pointer nor vector
    7 |     if (s[0] == '1') ++counter;
      |          ^
main.c:8:10: error: subscripted value is neither array nor pointer nor vector
    8 |     if (s[1] == '1') ++counter;
      |          ^
main.c:9:10: error: subscripted value is neither array nor pointer nor vector
    9 |     if (s[2] == '1') ++counter;
      |          ^
main.c:10:5: error: 'cout' undeclared (first use in this function); did you mean 'counter'?
   10 |     cout << counter << endl;
      |     ^~~~
      |     counter
main.c:10:24: error: 'endl' undeclared (first use in this function)
   10 |     cout << counter << endl;
      |                        ^~~~