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

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

int main() {
  string s
  int t =0;
  cin >> s ;
  for(int i = 1, i < 3, i++){
    if(s.at(i) = 1){
      t +=1;
    }
  }
  cou << t << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'int'
    6 |   int t =0;
      |   ^~~
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s ;
      |          ^
a.cc:8:19: error: expected ';' before '<' token
    8 |   for(int i = 1, i < 3, i++){
      |                   ^~
      |                   ;
a.cc:8:20: error: expected primary-expression before '<' token
    8 |   for(int i = 1, i < 3, i++){
      |                    ^
a.cc:8:28: error: expected ';' before ')' token
    8 |   for(int i = 1, i < 3, i++){
      |                            ^
      |                            ;
a.cc:10:7: error: 't' was not declared in this scope
   10 |       t +=1;
      |       ^
a.cc:13:3: error: 'cou' was not declared in this scope; did you mean 'cos'?
   13 |   cou << t << endl;
      |   ^~~
      |   cos
a.cc:13:10: error: 't' was not declared in this scope; did you mean 'tm'?
   13 |   cou << t << endl;
      |          ^
      |          tm
Language: C++

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

int main() {
  int a1,a2,a3;
  int t =0;
  cin << a << b << c <<endl;
  for(i = 1, i < 3, i++){
    if(ai = 1){
      t +=1;
    }
  }
  cou >> t;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'a' was not declared in this scope
    7 |   cin << a << b << c <<endl;
      |          ^
a.cc:7:15: error: 'b' was not declared in this scope
    7 |   cin << a << b << c <<endl;
      |               ^
a.cc:7:20: error: 'c' was not declared in this scope
    7 |   cin << a << b << c <<endl;
      |                    ^
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i = 1, i < 3, i++){
      |       ^
a.cc:13:3: error: 'cou' was not declared in this scope; did you mean 'cos'?
   13 |   cou >> t;
      |   ^~~
      |   cos
a.cc:14:1: error: expected primary-expression before '}' token
   14 | }
      | ^
a.cc:13:12: error: expected ')' before '}' token
   13 |   cou >> t;
      |            ^
      |            )
   14 | }
      | ~           
a.cc:8:6: note: to match this '('
    8 |   for(i = 1, i < 3, i++){
      |      ^
a.cc:14:1: error: expected primary-expression before '}' token
   14 | }
      | ^
Language: C++

#include<iostream>
#include<string>

using namespace std;


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   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:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout<<a/100+a%100/10+a%10<<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:6:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout<<a/100+a%100/10+a%10<<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 s1, s2, s3;
  name s1=1, s2=1, s3=1
  cin >> s1 >> s2 >> s3;
  cout << s1+s2+s3<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'name' was not declared in this scope; did you mean 'tzname'?
    6 |   name s1=1, s2=1, s3=1
      |   ^~~~
      |   tzname
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before 'endl'
    7 |   cout << a % 9 endl;
      |                ^~~~~
      |                ;
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: error: no matching function for call to 'std::vector<int>::size(int)'
    8 |   for (int i = 0; i < vec.size(3); i++) {
      |                       ~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:992:7: note: candidate: 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]'
  992 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/usr/include/c++/14/bits/stl_vector.h:992:7: note:   candidate expects 0 arguments, 1 provided
a.cc:9:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if (vec.at(i) == "1") {
      |         ~~~~~~~~~~^~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: error: no matching function for call to 'std::vector<int>::size(int)'
    8 |   for (int i = 0; i < vec.size(3); i++) {
      |                       ~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:992:7: note: candidate: 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]'
  992 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/usr/include/c++/14/bits/stl_vector.h:992:7: note:   candidate expects 0 arguments, 1 provided
a.cc:9:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if (vec.at(i) == "1") {
      |         ~~~~~~~~~~^~~~~~
a.cc:10:12: error: expected ';' before '}' token
   10 |     count++
      |            ^
      |            ;
   11 |     }
      |     ~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected unqualified-id before '=' token
    8 |   for (int = 0; i < vec.size(3); i++) {
      |            ^
a.cc:8:11: error: expected ';' before '=' token
    8 |   for (int = 0; i < vec.size(3); i++) {
      |           ^~
      |           ;
a.cc:8:12: error: expected primary-expression before '=' token
    8 |   for (int = 0; i < vec.size(3); i++) {
      |            ^
a.cc:8:17: error: 'i' was not declared in this scope
    8 |   for (int = 0; i < vec.size(3); i++) {
      |                 ^
a.cc:8:29: error: no matching function for call to 'std::vector<int>::size(int)'
    8 |   for (int = 0; i < vec.size(3); i++) {
      |                     ~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:992:7: note: candidate: 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]'
  992 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
/usr/include/c++/14/bits/stl_vector.h:992:7: note:   candidate expects 0 arguments, 1 provided
a.cc:8:32: error: expected ')' before ';' token
    8 |   for (int = 0; i < vec.size(3); i++) {
      |       ~                        ^
      |                                )
a.cc:8:34: error: 'i' was not declared in this scope
    8 |   for (int = 0; i < vec.size(3); i++) {
      |                                  ^
Language: Java

import java.util.Scanner;

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


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

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

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

Compiler output:
a.cc:6:10: error: extended character 　 is not valid in an identifier
    6 |   cin >> a　;
      |          ^
a.cc: In function 'int main()':
a.cc:6:10: error: 'a\U00003000' was not declared in this scope
    6 |   cin >> a　;
      |          ^~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: request for member 'size' in 's', which is of non-class type 'int'
    9 |   for(int i=0;i<s.size();i++){
      |                   ^~~~
a.cc:10:9: error: invalid types 'int[int]' for array subscript
   10 |     if(s[i]=='1'){
      |         ^
Language: C++

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

int main () {
  string s; 
  cin >> s;
  int r = 0;
  for(int i= 0;i< s.size();i++){
    if(s[i] == "1"){
      r++;
      cout << r << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: 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 () {
  int a,b,c;
  cin >> a >> b >> c;

  if(a==0,b==0,c==0{
    cout << 0;
  }
  if(a==1,b==0,c==0||a==0,b==1,c==0||a==0,b==0,c==1){
    cout << 1;
  }
  if(a==1,b==1,c==1){
    cout << 3;
  }
     else{
       cout << 2;
     }
     }
       

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ')' before '{' token
    8 |   if(a==0,b==0,c==0{
      |     ~              ^
      |                    )
a.cc:20:6: error: expected primary-expression before '}' token
   20 |      }
      |      ^
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] == '2') ++counter;
  if(s[1] == '3') ++coutner;
  
  cout << coutner << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: 'coutner' was not declared in this scope; did you mean 'counter'?
   14 |   if(s[1] == '3') ++coutner;
      |                     ^~~~~~~
      |                     counter
a.cc:16:11: error: 'coutner' was not declared in this scope; did you mean 'counter'?
   16 |   cout << coutner << endl;
      |           ^~~~~~~
      |           counter
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;
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main () {
  string S;
  cin >> S;
  int count = 0;
  for (char a; S) {
    if (a == '0') count++;
  }
  cout << count << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: could not convert 'S' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
    7 |   for (char a; S) {
      |                ^
      |                |
      |                std::string {aka std::__cxx11::basic_string<char>}
a.cc:7:17: error: expected ';' before ')' token
    7 |   for (char a; S) {
      |                 ^
      |                 ;
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:7: error: subscripted value is neither array nor pointer nor vector
    6 |   if(a[0]=='1'){count++;}
      |       ^
main.c:7:9: error: subscripted value is neither array nor pointer nor vector
    7 |     if(a[1]=='1'){count++;}
      |         ^
main.c:8:9: error: subscripted value is neither array nor pointer nor vector
    8 |     if(a[2]=='1'){count++;}
      |         ^
Language: C

#include <stdio.h>
int main(void){
  char a;
  int count;
  scanf("%s %s %s",&a,&b,&c);
  if(a[0]=='1'){count++;}
    if(a[1]=='1'){count++;}
    if(a[2]=='1'){count++;}
  printf("%d",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:24: error: 'b' undeclared (first use in this function)
    5 |   scanf("%s %s %s",&a,&b,&c);
      |                        ^
main.c:5:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:27: error: 'c' undeclared (first use in this function)
    5 |   scanf("%s %s %s",&a,&b,&c);
      |                           ^
main.c:6:7: error: subscripted value is neither array nor pointer nor vector
    6 |   if(a[0]=='1'){count++;}
      |       ^
main.c:7:9: error: subscripted value is neither array nor pointer nor vector
    7 |     if(a[1]=='1'){count++;}
      |         ^
main.c:8:9: error: subscripted value is neither array nor pointer nor vector
    8 |     if(a[2]=='1'){count++;}
      |         ^
Language: C

#include <stdio.h>
int main(void){
  char a,b,c;
  int count;
  scanf("%s %s %s",&a,&b,&c);
  if(a[0]=='1'){count++;}
    if(b[0]=='1'){count++;}
    if(c[0]=='1'){count++;}
  printf("%d",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: subscripted value is neither array nor pointer nor vector
    6 |   if(a[0]=='1'){count++;}
      |       ^
main.c:7:9: error: subscripted value is neither array nor pointer nor vector
    7 |     if(b[0]=='1'){count++;}
      |         ^
main.c:8:9: error: subscripted value is neither array nor pointer nor vector
    8 |     if(c[0]=='1'){count++;}
      |         ^
Language: C++

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

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

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

#include <iostream>
#include <stdlib.h>

using namespace std;

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


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

//#include <string>
//#include <sstream>
#include <iostream>
#include <stdlib.h>

using namespace std;

int main(){
  string s;
  cin >> s;
  
  int ans;
  for(int i = 0; i < s.length(); i++){
    ans += stoi(s[i]);
  }
  
  cout << ans << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   14 |     ans += stoi(s[i]);
      |            ~~~~^~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:3:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
Language: C++

//#include <string>
//#include <sstream>
#include <iostream>
#include <stdlib.h>

using namespace std;

int main(){
  string s;
  cin >> s;
  
  int ans;
  for(int i = 0; i < s.length(); i++){
    ans += atoi(s[i]);
  }
  
  cout << ans << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   14 |     ans += atoi(s[i]);
      |            ~~~~^~~~~~
      |                |
      |                __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:3:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

//#include <string>
#include <sstream>
#include <iostream>
#include <stdlib.h>

using namespace std;

int main(){
  string s;
  cin >> s;
  
  int ans;
  for(int i = 0; i < length(s); i++){
    ans += isstringstream(s[i]);
  }
  
  cout << ans << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: 'length' was not declared in this scope
   13 |   for(int i = 0; i < length(s); i++){
      |                      ^~~~~~
a.cc:14:12: error: 'isstringstream' was not declared in this scope
   14 |     ans += isstringstream(s[i]);
      |            ^~~~~~~~~~~~~~
Language: C++

"#include <string>
#include <sstream>
#include <iostream>
#include <stdlib.h>

using namespace std;

int main(){
  string s;
  cin >> s;
  
  int ans;
  for(int i = 0; i < length(s); i++){
    ans += isstringstream(s[i]);
  }
  
  cout << ans << endl;
}
    


Compiler output:
a.cc:1:1: warning: missing terminating " character
    1 | "#include <string>
      | ^
a.cc:1:1: error: missing terminating " character
    1 | "#include <string>
      | ^~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:13:22: error: 'length' was not declared in this scope
   13 |   for(int i = 0; i < length(s); i++){
      |                      ^~~~~~
a.cc:14:12: error: 'isstringstream' was not declared in this scope
   14 |     ans += isstringstream(s[i]);
      |            ^~~~~~~~~~~~~~
Language: C++

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

using namespace std;

int main(){
  string s;
  cin >> s;
  
  int ans;
  for(int i = 0; i < len(s); i++){
    ans += atoi(s[i]);
  }
  
  cout << ans << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: 'len' was not declared in this scope; did you mean 'mblen'?
   12 |   for(int i = 0; i < len(s); i++){
      |                      ^~~
      |                      mblen
a.cc:13:16: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   13 |     ans += atoi(s[i]);
      |            ~~~~^~~~~~
      |                |
      |                __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C

#include "stdio.h"
int main()
{
    char *s;
    int counter = 0;

    scanf("%s", s);

    if s[0] = "1"
        counter++;
    if s[1] = "1"
        counter++;
    if s[2] = "1"
        counter++;

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


Compiler output:
main.c: In function 'main':
main.c:9:8: error: expected '(' before 's'
    9 |     if s[0] = "1"
      |        ^
      |        (
main.c:9:13: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
    9 |     if s[0] = "1"
      |             ^
main.c:11:8: error: expected '(' before 's'
   11 |     if s[1] = "1"
      |        ^
      |        (
main.c:11:13: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   11 |     if s[1] = "1"
      |             ^
main.c:13:8: error: expected '(' before 's'
   13 |     if s[2] = "1"
      |        ^
      |        (
main.c:13:13: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   13 |     if s[2] = "1"
      |             ^
Language: C++

#include <stdlib.h>

using namespace std;

int main(){
  string s;
  cin >> s;
  
  int ans;
  for(int i = 0; i < len(s); i++){
    ans += atoi(s[i]);
  }
  
  cout << ans << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s;
      |   ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include <stdlib.h>
  +++ |+#include <string>
    2 | 
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> s;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdlib.h>
  +++ |+#include <iostream>
    2 | 
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s;
      |          ^
a.cc:10:22: error: 'len' was not declared in this scope; did you mean 'mblen'?
   10 |   for(int i = 0; i < len(s); i++){
      |                      ^~~
      |                      mblen
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << ans << endl;
      |   ^~~~
a.cc:14:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:18: error: 'endl' was not declared in this scope
   14 |   cout << ans << endl;
      |                  ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <stdlib.h>
  +++ |+#include <ostream>
    2 |
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {

  int s;
  cin >> s[1] >> s[2] >> s[3];
    cout << s[1] * 1 + s[2] * 1 + s[3] * 1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: invalid types 'int[int]' for array subscript
    7 |   cin >> s[1] >> s[2] >> s[3];
      |           ^
a.cc:7:19: error: invalid types 'int[int]' for array subscript
    7 |   cin >> s[1] >> s[2] >> s[3];
      |                   ^
a.cc:7:27: error: invalid types 'int[int]' for array subscript
    7 |   cin >> s[1] >> s[2] >> s[3];
      |                           ^
a.cc:8:14: error: invalid types 'int[int]' for array subscript
    8 |     cout << s[1] * 1 + s[2] * 1 + s[3] * 1 << endl;
      |              ^
a.cc:8:25: error: invalid types 'int[int]' for array subscript
    8 |     cout << s[1] * 1 + s[2] * 1 + s[3] * 1 << endl;
      |                         ^
a.cc:8:36: error: invalid types 'int[int]' for array subscript
    8 |     cout << s[1] * 1 + s[2] * 1 + s[3] * 1 << endl;
      |                                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {

  int s1 , s2 , s3;
  cin >> s1 >> s2 >> s3;
    cout << a * 1 + b * 1 + c * 1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'a' was not declared in this scope
    8 |     cout << a * 1 + b * 1 + c * 1 << endl;
      |             ^
a.cc:8:21: error: 'b' was not declared in this scope
    8 |     cout << a * 1 + b * 1 + c * 1 << endl;
      |                     ^
a.cc:8:29: error: 'c' was not declared in this scope
    8 |     cout << a * 1 + b * 1 + c * 1 << endl;
      |                             ^
Language: C++

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

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


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

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

int main(){
  int a = 0;
  int s[3];
  for(int i =0; i<3; i++){
    cin>s[i];
    if(s[i]==1){ a++;}
  }
  return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namesapce'
    3 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |     cin>s[i];
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

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


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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: 'c' was not declared in this scope
    7 |   if(c[0]==1) count++;
      |      ^
a.cc:8:6: error: 'c' was not declared in this scope
    8 |   if(c[1]==1) count++;
      |      ^
a.cc:9:6: error: 'c' was not declared in this scope
    9 |   if(c[2]==1) count++;
      |      ^
Language: C++

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string s;
      |   ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>s;
      |   ^~~
a.cc:6:8: error: 's' was not declared in this scope
    6 |   cin>>s;
      |        ^
a.cc:7:6: error: 'c' was not declared in this scope
    7 |   if(c[0]==1) count++;
      |      ^
a.cc:8:6: error: 'c' was not declared in this scope
    8 |   if(c[1]==1) count++;
      |      ^
a.cc:9:6: error: 'c' was not declared in this scope
    9 |   if(c[2]==1) count++;
      |      ^
a.cc:10:3: error: 'cout' was not declared in this scope; did you mean 'count'?
   10 |   cout <<count<<endl;
      |   ^~~~
      |   count
a.cc:10:17: error: 'endl' was not declared in this scope
   10 |   cout <<count<<endl;
      |                 ^~~~
Language: C++

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

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

#include<stdio.h>
#include<stdlib.h>
int main(void){
  char a[3];
  int i,ans=0;
  for(i=0;i<3;i++){
    a[i] = getchar();
    ans+=ctoi(a[i])-'0';
  }
  printf("%d\n",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:10: error: implicit declaration of function 'ctoi'; did you mean 'atoi'? [-Wimplicit-function-declaration]
    8 |     ans+=ctoi(a[i])-'0';
      |          ^~~~
      |          atoi
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    int s1 = sc.nextInt();
    int s2 = sc.nextInt();
    int s3 = sc.nestInt();
    int sum = (s1 + s2 + s3);
    
    System.out.print(sum);
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
    int s3 = sc.nestInt();
               ^
  symbol:   method nestInt()
  location: variable sc of type Scanner
1 error
Language: C++

print(input().count(“1”))

Compiler output:
a.cc:1:21: error: extended character “ is not valid in an identifier
    1 | print(input().count(“1”))
      |                     ^
a.cc:1:21: error: extended character ” is not valid in an identifier
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token
    1 | print(input().count(“1”))
      |      ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:4: error: lvalue required as left operand of assignment
    7 |   s/100=sa;
      |   ~^~~~
a.cc:8:9: error: lvalue required as left operand of assignment
    8 |   (s-sa)/10=sb;
      |   ~~~~~~^~~
a.cc:9:5: error: lvalue required as left operand of assignment
    9 |   sa-sb=sc;
      |   ~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int s;
  cin >> s;
  s/100=sa;
  (s-sa)/10=sb;
  sa-sb=sc;
  cout << sa+sb+sc <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'sa' was not declared in this scope; did you mean 's'?
    7 |   s/100=sa;
      |         ^~
      |         s
a.cc:8:13: error: 'sb' was not declared in this scope; did you mean 's'?
    8 |   (s-sa)/10=sb;
      |             ^~
      |             s
a.cc:9:9: error: 'sc' was not declared in this scope; did you mean 's'?
    9 |   sa-sb=sc;
      |         ^~
      |         s
Language: Java

package atCoderBeginnerC;

import java.util.Arrays;
import java.util.Collections;
//ABC081
//入力
/*
 * 5 2
 * 1 1 2 2 5
 */
//出力
/*
 * 1
 */
import java.util.Scanner;

public class NotSoDiverse {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int N, K;
		int[] numberType;// 実際の数字を格納
		int[] Type;// 実際の数字が何個あるか

		String number = sc.nextLine();
		String[] numbers = number.split(" ");
		N = Integer.parseInt(numbers[0]);
		Type = new int[N];
		K = Integer.parseInt(numbers[1]);

		number = sc.nextLine();
		numbers = number.split(" ");
		numberType = new int[numbers.length];

		for (int i = 0; i < numbers.length; i++) {
			Type[Integer.parseInt(numbers[i]) - 1]++;
		}
//		for(int i = 0; i < Type.length; i++) {
//			System.out.print(Type[i] + " ");
//		}

		//大きい順にソート
//		for(int i = 0; i < Type.length-1; i++) {
//			for(int j = i+1; j < Type.length; j++) {
//				if(Type[i] < Type[j]) {
//					int tmp = Type[i];
//					Type[i] = Type[j];
//					Type[j] = tmp;
//				}
//
//			}
//		}

		//ソートを使用
		Arrays.sort(Type);

//		for(int i = 0; i < Type.length; i++) {
//			System.out.print(Type[i] + " ");
//		}

		int sum = 0;
		for(int i = Type.length-1; Type.length - 1 - K < i; i--) {
			sum = sum + Type[i];
		}

		System.out.println(N - sum);
	}

}


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

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

int main() {
  int A, x, y, z;
  cin >> A;
  x = A % 2;
  Y = (A - x) % 20;
  z = (A - x - y) % 200;
  cout << x + y/10 + z/100 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'Y' was not declared in this scope
    8 |   Y = (A - x) % 20;
      |   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b,c;
  cin >> a>>b>>c;
  cout << 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected primary-expression before '}' token
    8 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  
  string a;
  cin>>a;
  
  int count=0;
  if(a[0]=="1") count++;
  if(a[1]=="1") count++;
  if(a[2]=="1") count++;
  
  cout<<count;
}
  

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'stirng' was not declared in this scope
    4 |   stirng s;
      |   ^~~~~~
a.cc:5:10: error: 's' was not declared in this scope
    5 |   cin >> s;
      |          ^
a.cc:8:5: error: 'couter' was not declared in this scope; did you mean 'counter'?
    8 |     couter++;
      |     ^~~~~~
      |     counter
a.cc:11:5: error: 'couter' was not declared in this scope; did you mean 'counter'?
   11 |     couter++;
      |     ^~~~~~
      |     counter
Language: C

#include<stdio.h>
int main(void)
{
	int s1, s2, s3,sum=0;
	//input "�Por0"
	scanf_s("%d%d%d", &s1, &s2, &s3);
	//����
	if (s1 == 1)
	{
		sum += 1;
	}
	else
	{
		//�������Ȃ�
	}
	if (s2 == 1)
	{
		sum += 1;
	}
	else
	{
		//�������Ȃ�
	}
	if (s3 == 1)
	{
		sum += 1;
	}
	else
	{
		//�������Ȃ�
	}
	printf("%d", sum);
	return 0;
}



//int main(void) 
//{
//	char s[9];
//	int c = 0, i;
//	scanf_s("%s", s);
//	for (i=0; i < 3; i++)
//	{
//		c += s[i] == '1';
//	}
//	printf("%d\n", c);
//	return 0;
//}

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

#include<stdio.h>
int main(void)
{
	int s1, s2, s3,sum=0;
	//input "�Por0"
	scanf_s("%d%d%d", &s1, &s2, &s3);
	//����
	if (s1 == 1)
	{
		sum += 1;
	}
	else
	{
		//�������Ȃ�
	}
	if (s2 == 1)
	{
		sum += 1;
	}
	else
	{
		//�������Ȃ�
	}
	if (s3 == 1)
	{
		sum += 1;
	}
	else
	{
		//�������Ȃ�
	}
	printf("%d", sum);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    6 |         scanf_s("%d%d%d", &s1, &s2, &s3);
      |         ^~~~~~~
      |         scanf
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:12: error: expected initializer before '.' token
    5 |   int S1,S2.S3;
      |            ^
a.cc:7:16: error: 'S2' was not declared in this scope; did you mean 'S1'?
    7 |   cin >> S1 >> S2 >> S3;
      |                ^~
      |                S1
a.cc:7:22: error: 'S3' was not declared in this scope; did you mean 'S1'?
    7 |   cin >> S1 >> S2 >> S3;
      |                      ^~
      |                      S1
Language: C++

#include<iostream>
#include <string>
using namespace std;
int main(){
  // 整数の入力
  string a;
  cin >> a;
	count = 0;
  if(a[0]=='1')count++;
  if(a[1]=='1')count++;
  if(a[2]=='1')count++;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'count' was not declared in this scope
    8 |         count = 0;
      |         ^~~~~
Language: C++

#include<iostream>
#include <string>
using namespace std;
int main(){
  // 整数の入力
  str a;
  cin >> a;
	count = 0;
  if(a[0]=='1')count++;
  if(a[1]=='1')count++;
  if(a[2]=='1')count++;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |   str a;
      |   ^~~
      |   std
a.cc:7:10: error: 'a' was not declared in this scope
    7 |   cin >> a;
      |          ^
a.cc:8:9: error: 'count' was not declared in this scope
    8 |         count = 0;
      |         ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  // 整数の入力
  str a;
  cin >> a;
  int count = 0;
  if(a[0]=='1')count++;
  if(a[1]=='1')count++;
  if(a[2]=='1')count++;    
  cout << count << endl;
  return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
  // 整数の入力
  str a;
  cin >> a;
  int count = 0;
  if(a[0]=='1')count++;
  if(a[1]=='1')count++;
  if(a[2]=='1')count++;    
  
  return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
  // 整数の入力
  str a;
  cin >> a;
	count = 0;
  if(a[0]=='1')count++;
  if(a[1]=='1')count++;
  if(a[2]=='1')count++;    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |   str a;
      |   ^~~
      |   std
a.cc:7:10: error: 'a' was not declared in this scope
    7 |   cin >> a;
      |          ^
a.cc:8:9: error: 'count' was not declared in this scope
    8 |         count = 0;
      |         ^~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected ';' before 'cout'
    6 |   cin>>a
      |         ^
      |         ;
    7 |   cout<< (a/100)+(a-(a/100)*100)/10+(a-a/100-((a-(a/100)*100)/10)) <<endl;
      |   ~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cont' was not declared in this scope; did you mean 'const'?
    7 |   cont << a/100 + a%100/10 +a%100%10 << endl;
      |   ^~~~
      |   const
Language: C++

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

int main(){
  int s;s1,s2,s3;
  s1 = s/100;
  s2 = (s-s1*100)/10;
  s3 = s-s1*100-s2*10;
  cout << s1 + s2 + s3 << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 's1' was not declared in this scope; did you mean 's'?
    5 |   int s;s1,s2,s3;
      |         ^~
      |         s
a.cc:5:12: error: 's2' was not declared in this scope; did you mean 's'?
    5 |   int s;s1,s2,s3;
      |            ^~
      |            s
a.cc:5:15: error: 's3' was not declared in this scope; did you mean 's'?
    5 |   int s;s1,s2,s3;
      |               ^~
      |               s
Language: C++

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected ';' before 'cin'
    7 |   c = a/100
      |            ^
      |            ;
    8 |    cin >> a;
      |    ~~~
Language: Java

import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
           int s = 1 ;
        for(int i = 1; i<3;i++)
        System.out.println(s.length());
    }
}

Compiler output:
Main.java:6: error: variable s is already defined in method main(String[])
           int s = 1 ;
               ^
Main.java:8: error: int cannot be dereferenced
        System.out.println(s.length());
                            ^
2 errors
Language: Java

import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
      int number = 0 ;
        for(int i = 1; i<3;i++)
        System.out.println(length());
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        System.out.println(length());
                           ^
  symbol:   method length()
  location: class Main
1 error
Language: Java

import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
      int number = 0 ;
        for(int i = 1; i<3;i++)
        System.out.println;
    }
}
    

Compiler output:
Main.java:8: error: not a statement
        System.out.println;
                  ^
1 error
Language: Java

import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
      int number = 0
        for(int i = 1; i<3;i++)
        System.out.println;
    }
}
    

Compiler output:
Main.java:6: error: ';' expected
      int number = 0
                    ^
Main.java:8: error: not a statement
        System.out.println;
                  ^
2 errors
Language: Java

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

Compiler output:
Main.java:4: error: cannot find symbol
    Scanner = new Scanner (System.in);
    ^
  symbol:   variable Scanner
  location: class Main
Main.java:5: error: cannot find symbol
    String s = sc.next();
               ^
  symbol:   variable sc
  location: class Main
2 errors
Language: Java

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

Compiler output:
Main.java:3: error: cannot find symbol
  public static void main (string[] args) {
                           ^
  symbol:   class string
  location: class Main
Main.java:4: error: cannot find symbol
    Scanner = new Scanner (System.in);
    ^
  symbol:   variable Scanner
  location: class Main
Main.java:5: error: cannot find symbol
    String s = sc.next();
               ^
  symbol:   variable sc
  location: class Main
3 errors