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

#include <stdio.h>

int main(void){
	int counter[26] = {0};
	int i;
	while(scanf("%c" , &ch) != EOF){
		int num;
		char ch;
		num = ch - 'a';
		if(num>=0&&num<=26){
			counter[num]++;
		}
	}
	for(i=0;i<26;i++){
		printf("%c : %d\n",i+'a',counter[i]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:29: error: 'ch' undeclared (first use in this function)
    6 |         while(scanf("%c" , &ch) != EOF){
      |                             ^~
main.c:6:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int alpha[26]={0};
string str;
while(getline(cin,str)){
for(int i=0;i<(int)str.size();i++){
if(str[i]>='a' && str[i]<='z')alpha[str[i]-'a']++;
else if(str[i]>='A' && str[i]<='Z')alpha[str[i]-'A']++;
}
}
for(int i=0;i<26;i++)
printf("%c : %d\n",i+'a',alpha[i]);
}

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

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
 
int main(){
    int i,l,n;
    int list[26];
      
    for(i=0;i<26;i++)list[i]=0;
     
    while(1){
        l=fgetc(stdin);
        if(l == EOF)break;
        n=l-'A';
        if(0<=n && n<26)list[n]++;
        else{
            n=l-'a';
            if(0<=n && n<26)list[n]++;
        }
    }
      
    for(i=0;i<26;i++){
        printf("%c : %d\n",'a'+i,list[i]);
    }
     
    return 0;
     

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

#include "stdio.h"
#include "ctype.h"
	
int main(void){
	int num,i,counter[26]={0};
	char ch;
	
	while(scanf("%c",&ch)!=EOF){
		if(isalpha(ch)!=0){
		ch=tolower(ch);
		num=ch-'a';	
		counter[num]++;
		}
	}
	printf("\n")
	for(i=0;i<26;i++){
	printf("\n%c : %d",i+'a',counter[i]);
	}
	printf("\n");
	return 0;
	}

Compiler output:
main.c: In function 'main':
main.c:15:21: error: expected ';' before 'for'
   15 |         printf("\n")
      |                     ^
      |                     ;
   16 |         for(i=0;i<26;i++){
      |         ~~~
Language: C

#include<cstdio>
#include<cctype>
using namespace std;

int main(){
	int count[26];
	int i,num;
	char c;
	for(i=0;i<26;i++){
		count[i]=0;
	}
	while((c=getchar())!=EOF){
		c=tolower(c);
		num = c - 'a'; //入力された文字を0~25に置き換え
		if(num >= 0 && num < 26){
			count[num]++;
		}
		
	}
	for(i=0;i<26;i++){
		printf("%c : %d\n",'a'+i,count[i]);
	}
	return 0;
}

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

#include <cstdio>
#include <cctype>
const int ASCII = 26;
using namespace std;

int main(){
	char ch;
	int charcnt[ASCII] = {0}, num;

	while(scanf("%c", &ch) != EOF){
		ch = tolower(ch);
		num = ch - 'a';
		if((num >= 0) && (num < ASCII)){
			charcnt[num]++;
		}
	}
	for(int i = 0; i < ASCII; i++){
		ch = i + 'a';
		printf("%s : %d\n", ch, charcnt[i]);
	}

	return 0;
}

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

#include <stdio.h>
#include <ctype.h>
const int ASCII = 26;
using namespace std;

int main(){
	char ch;
	int charcnt[ASCII] = {0}, num;

	while(scanf("%c", &ch) != EOF){
		ch = tolower(ch);
		num = ch - 'a';
		if((num >= 0) && (num < ASCII)){
			charcnt[num]++;
		}
	}
	for(int i = 0; i < ASCII; i++){
		ch = i + 'a';
		printf("%s : %d\n", ch, charcnt[i]);
	}

	return 0;
}

Compiler output:
main.c:4:1: error: unknown type name 'using'
    4 | using namespace std;
      | ^~~~~
main.c:4:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    4 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:8:30: error: variable-sized object may not be initialized except with an empty initializer
    8 |         int charcnt[ASCII] = {0}, num;
      |                              ^
Language: C

#include <stdio.h>
#include <ctype.h>
const int ASCII = 26;

int main(){
	char ch;
	int charcnt[ASCII] = {0}, num, i;

	while(scanf("%c", &ch) != EOF){
		ch = tolower(ch);
		num = ch - 'a';
		if((num >= 0) && (num < ASCII)){
			charcnt[num]++;
		}
	}
	for(i = 0; i < ASCII; i++){
		ch = i + 'a';
		printf("%s : %d\n", ch, charcnt[i]);
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:30: error: variable-sized object may not be initialized except with an empty initializer
    7 |         int charcnt[ASCII] = {0}, num, i;
      |                              ^
Language: C

#include <stdio.h>
#include <ctype.h>
#define ASCII 26;

int main(){
	char ch;
	int charcnt[ASCII] = {0}, num, i;

	while(scanf("%c", &ch) != EOF){
		ch = tolower(ch);
		num = ch - 'a';
		if((num >= 0) && (num < ASCII)){
			charcnt[num]++;
		}
	}
	for(i = 0; i < ASCII; i++){
		ch = i + 'a';
		printf("%s : %d\n", ch, charcnt[i]);
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:17: error: expected ']' before ';' token
    3 | #define ASCII 26;
      |                 ^
main.c:7:21: note: in expansion of macro 'ASCII'
    7 |         int charcnt[ASCII] = {0}, num, i;
      |                     ^~~~~
main.c:7:33: error: expected expression before ',' token
    7 |         int charcnt[ASCII] = {0}, num, i;
      |                                 ^
main.c:7:35: error: 'num' undeclared (first use in this function)
    7 |         int charcnt[ASCII] = {0}, num, i;
      |                                   ^~~
main.c:7:35: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:40: error: 'i' undeclared (first use in this function)
    7 |         int charcnt[ASCII] = {0}, num, i;
      |                                        ^
main.c:3:17: error: expected ')' before ';' token
    3 | #define ASCII 26;
      |                 ^
main.c:12:41: note: in expansion of macro 'ASCII'
   12 |                 if((num >= 0) && (num < ASCII)){
      |                                         ^~~~~
main.c:12:34: note: to match this '('
   12 |                 if((num >= 0) && (num < ASCII)){
      |                                  ^
main.c:13:25: error: 'charcnt' undeclared (first use in this function); did you mean 'char'?
   13 |                         charcnt[num]++;
      |                         ^~~~~~~
      |                         char
main.c:16:29: error: expected expression before ';' token
   16 |         for(i = 0; i < ASCII; i++){
      |                             ^
Language: C

#include <iostream>
#include <cctype>
using namespace std;
const int ASCII = 26;

int main(){
	char ch;
	int charcnt[ASCII] = {0}, num;

	while(cin >> ch){
		ch = tolower(ch);
		num = ch - 'a';
		if((num >= 0) && (num < ASCII)){
			charcnt[num]++;
		}
	}
	for(int i = 0; i < ASCII; i++){
		ch = i + 'a';
		cout << ch << " : " << charcnt[i] << "\n";
	}
	cout << flush;

	return 0;
}

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

#include <stdio.h>

int main()
{
	char ch;
	int cnt[26];
	int i,idx;
	
	for(i=0;i<26;i++){
		cnt[i]=0;
	}
	
	while(scanf("%c",&ch)!=EOF){
		if(ch>96&&ch<123){
			idx=ch - 97;
			cnt[idx]++;
		}else if(cd>64&&ch<91){
			idx=ch-65;
			cnt[idx]++;
		}
	}
	
	for(i=0;i<26;i++){
		printf("%c : %d\n",i+97,cnt[i]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:26: error: 'cd' undeclared (first use in this function); did you mean 'ch'?
   17 |                 }else if(cd>64&&ch<91){
      |                          ^~
      |                          ch
main.c:17:26: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h> int main(void) {    int alp[26] = {0},i,j;    char c;    while((c = getchar()) != EOF){        if(c == '\0')            break;                     if(c >='a' && c <='z')            alp[c-'a']++;        else if(c >= 'A' && c <= 'Z')            alp[c-'A']++;    }    for(i = 0; i < 26; i++){        printf("%c : %d\n",(char)('a'+i),alp[i]);    }         return 0;}

Compiler output:
main.c:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> int main(void) {    int alp[26] = {0},i,j;    char c;    while((c = getchar()) != EOF){        if(c == '\0')            break;                     if(c >='a' && c <='z')            alp[c-'a']++;        else if(c >= 'A' && c <= 'Z')            alp[c-'A']++;    }    for(i = 0; i < 26; i++){        printf("%c : %d\n",(char)('a'+i),alp[i]);    }         return 0;}
      |                    ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include <stdio.h>
#include <string.h>
int main(void){
	int sum[27],i;
	char a;
	for(i=0; i<27; i++){
		sum[i]=0;
	}
	while(scanf("%c")!=EOF){
		if(c>='a' && c<='z'){
			sum[c-'a']++;
		}else if(c>='a' && c<='z'){
			sum[c-'A']++;
		}
	
	}
	for(i=0; i<27; i++){
		scanf("%c : %d\n",'a'+i,sum[i]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:20: error: 'c' undeclared (first use in this function)
   10 |                 if(c>='a' && c<='z'){
      |                    ^
main.c:10:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

include<stdio.h>
#include<ctype.h>

int main(void)
{
	int ch;
	
	int cnt[26] = {0};
	
	while((ch = getchar()) != EOF)
	{
		ch = tolower(ch);
		if(ch >= 'a' && ch <= 'z') cnt[ch - 'a']++;
	}
	
	int i;
	
	for(i = 0;i < 26;i++)
		printf("%c : %d\n",'a' + i,cnt[i]);
	
	return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:10:21: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration]
   10 |         while((ch = getchar()) != EOF)
      |                     ^~~~~~~
main.c:3:1: note: 'getchar' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
    2 | #include<ctype.h>
  +++ |+#include <stdio.h>
    3 | 
main.c:10:35: error: 'EOF' undeclared (first use in this function)
   10 |         while((ch = getchar()) != EOF)
      |                                   ^~~
main.c:10:35: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:10:35: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   19 |                 printf("%c : %d\n",'a' + i,cnt[i]);
      |                 ^~~~~~
main.c:19:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:19:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main(){
    
    char ch;
    int count[26] = {0};
    int num=0;
    int i=0;
    
    while (scanf("%c", &ch) != EOF ){ //ファイルの最後まで
        if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')){ //文字の判別用
            
            if(ch >= 'a' && ch <= 'z'){ //大文字か小文字か
                num = ch - 'a';
                count[num]++;
                
            }else {
                num = ch - 'A';
          
                count[num]++;
            }
        } //endif  文字の判別用
    }
    
    //出力部
    for(i=0; i<26; i++){
        printf("%c : %d\n",'a'+i,count[i]);
    }
    
    
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:12: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |     while (scanf("%c", &ch) != EOF ){ //ファイルの最後まで
      |            ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:8:12: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |     while (scanf("%c", &ch) != EOF ){ //ファイルの最後まで
      |            ^~~~~
main.c:8:12: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:32: error: 'EOF' undeclared (first use in this function)
    8 |     while (scanf("%c", &ch) != EOF ){ //ファイルの最後まで
      |                                ^~~
main.c:8:32: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:8:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   25 |         printf("%c : %d\n",'a'+i,count[i]);
      |         ^~~~~~
main.c:25:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:25:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main(){
    
    char ch;
    int count[26] = {0};
    int num=0;
    int i=0;
    
    while (scanf("%c", &ch) != EOF ){
        if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')){
            
            if(ch >= 'a' && ch <= 'z'){
                num = ch - 'a';
                count[num]++;
                
            }else {
                num = ch - 'A';
          
                count[num]++;
            }
        }
    }
    
    for(i=0; i<26; i++){
        printf("%c : %d\n",'a'+i,count[i]);
    }
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:12: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |     while (scanf("%c", &ch) != EOF ){
      |            ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:8:12: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |     while (scanf("%c", &ch) != EOF ){
      |            ^~~~~
main.c:8:12: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:32: error: 'EOF' undeclared (first use in this function)
    8 |     while (scanf("%c", &ch) != EOF ){
      |                                ^~~
main.c:8:32: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:8:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   24 |         printf("%c : %d\n",'a'+i,count[i]);
      |         ^~~~~~
main.c:24:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:24:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:24:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main(){
    
    char ch;
    int count[26] = {0};
    int num;
    int i;
    
    num = 0;
    i = 0;
    
    while (scanf("%c", &ch) != EOF ){
        if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')){
            
            if(ch >= 'a' && ch <= 'z'){
                num = ch - 'a';
                count[num]++;
                
            }else {
                num = ch - 'A';
          
                count[num]++;
            }
        }
    }
    
    for(i=0; i<26; i++){
        printf("%c : %d\n",'a'+i,count[i]);
    }
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:12: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   11 |     while (scanf("%c", &ch) != EOF ){
      |            ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:11:12: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |     while (scanf("%c", &ch) != EOF ){
      |            ^~~~~
main.c:11:12: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:11:32: error: 'EOF' undeclared (first use in this function)
   11 |     while (scanf("%c", &ch) != EOF ){
      |                                ^~~
main.c:11:32: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:11:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:27:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   27 |         printf("%c : %d\n",'a'+i,count[i]);
      |         ^~~~~~
main.c:27:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:27:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:27:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main(){
    
    char ch=0;
    int count[26] = {0};
    int num=0;
    int i=0;
    
    while (scanf("%c", &ch)!=EOF){
        if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')){
            
            if(ch >= 'a' && ch <= 'z'){
                num = ch - 'a';
                count[num]++;
                
            }else {
                num = ch - 'A';
          
                count[num]++;
            }
        }
    }
    
    for(i=0; i<26; i++){
        printf("%c : %d\n",'a'+i,count[i]);
    }
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:12: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |     while (scanf("%c", &ch)!=EOF){
      |            ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:8:12: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |     while (scanf("%c", &ch)!=EOF){
      |            ^~~~~
main.c:8:12: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:30: error: 'EOF' undeclared (first use in this function)
    8 |     while (scanf("%c", &ch)!=EOF){
      |                              ^~~
main.c:8:30: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:8:30: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   24 |         printf("%c : %d\n",'a'+i,count[i]);
      |         ^~~~~~
main.c:24:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:24:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:24:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main(){
    char ch=0;
    int count[26] = {0};
    int num=0;
    int i=0;
    while (scanf("%c", &ch)!=EOF){
        if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')){
            if(ch >= 'a' && ch <= 'z'){
                num = ch - 'a';
                count[num]++;
            }else {
                num = ch - 'A';
                count[num]++;
            }
        }
    }
    for(i=0; i<26; i++){
        printf("%c : %d\n",'a'+i,count[i]);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:12: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |     while (scanf("%c", &ch)!=EOF){
      |            ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:6:12: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |     while (scanf("%c", &ch)!=EOF){
      |            ^~~~~
main.c:6:12: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:30: error: 'EOF' undeclared (first use in this function)
    6 |     while (scanf("%c", &ch)!=EOF){
      |                              ^~~
main.c:6:30: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:6:30: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |         printf("%c : %d\n",'a'+i,count[i]);
      |         ^~~~~~
main.c:18:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

  char ch;
  int i,num;
  int counter[26]=[0];


  while (scanf("%c",&ch)!=EOF) {
    if (islower(ch)) {
      num = ch-'a';
    }
    else if(isupper(ch)){
      num = ch-'A';
    }
    else{
      continue;
    }
    counter[num]++;

  }
  for (i=0; i<26; i++) {
    printf("%c : %d\n",i+'a',counter[i]);
  }
  printf("\n");
  return 0;

}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:7:19: error: expected expression before '[' token
    7 |   int counter[26]=[0];
      |                   ^
Language: C

#include <stdio.h>
int main()
{
	char c;
	int str[26]={0};
	int i;
	
	while(scanf("%c",&ch) != EOF)
	{
		if(c >= 'a' && c <= 'z')
			str[c-97]++;
		else if(c >= 'A' && c <= 'Z')
			str[c-65]++;
	}
	for(i=0;i<26;i++)
		printf("%c : %d\n",i+97,str[i]);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:27: error: 'ch' undeclared (first use in this function); did you mean 'c'?
    8 |         while(scanf("%c",&ch) != EOF)
      |                           ^~
      |                           c
main.c:8:27: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h> 
main(){
  int a,b,c, n, i, ans[1000]= {};
  char ch[100];
  while(~scanf("%s", ch)){
    
    n = strlen(ch);  
    for(i=0;i<n;i++){
      if(ch[i]>='A' && ch[i]<='Z'){
	ch[i]+=('a'-'A');
      }
    }
    for(i=0;i<n;i++){
      ans[ch[i]]++; 
    }
  }

  for(i='a';i<'a'+26;i++){#include<stdio.h> 
main(){
  int a,b,c, n, i, ans[1000]= {};
  char ch[100];
  while(~scanf("%s", ch)){
    
    n = strlen(ch);  
    for(i=0;i<n;i++){
      if(ch[i]>='A' && ch[i]<='Z'){
	ch[i]+=('a'-'A');
      }
    }
    for(i=0;i<n;i++){
      ans[ch[i]]++; 
    }
  }

  for(i='a';i<'a'+26;i++){
    printf("%c : %d\n", i, ans[i]);
  }
  
  return 0;
}

    printf("%c : %d\n", i, ans[i]);
  }
  
  return 0;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    7 |     n = strlen(ch);
      |         ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | main(){
main.c:7:9: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    7 |     n = strlen(ch);
      |         ^~~~~~
main.c:7:9: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:18:27: error: stray '#' in program
   18 |   for(i='a';i<'a'+26;i++){#include<stdio.h>
      |                           ^
main.c:18:28: error: 'include' undeclared (first use in this function)
   18 |   for(i='a';i<'a'+26;i++){#include<stdio.h>
      |                            ^~~~~~~
main.c:18:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:36: error: 'stdio' undeclared (first use in this function); did you mean 'stdin'?
   18 |   for(i='a';i<'a'+26;i++){#include<stdio.h>
      |                                    ^~~~~
      |                                    stdin
main.c:19:7: error: expected ';' before '{' token
   19 | main(){
      |       ^
      |       ;
Language: C

a[];main(c){for(;c=~getchar();)a[32|~c]++;for(c=97;a=c<123;)printf("%c : %d\n",c++,a[c]);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a[];main(c){for(;c=~getchar();)a[32|~c]++;for(c=97;a=c<123;)printf("%c : %d\n",c++,a[c]);}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:5: error: return type defaults to 'int' [-Wimplicit-int]
    1 | a[];main(c){for(;c=~getchar();)a[32|~c]++;for(c=97;a=c<123;)printf("%c : %d\n",c++,a[c]);}
      |     ^~~~
main.c: In function 'main':
main.c:1:5: error: type of 'c' defaults to 'int' [-Wimplicit-int]
main.c:1:21: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration]
    1 | a[];main(c){for(;c=~getchar();)a[32|~c]++;for(c=97;a=c<123;)printf("%c : %d\n",c++,a[c]);}
      |                     ^~~~~~~
main.c:1:1: note: 'getchar' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
  +++ |+#include <stdio.h>
    1 | a[];main(c){for(;c=~getchar();)a[32|~c]++;for(c=97;a=c<123;)printf("%c : %d\n",c++,a[c]);}
main.c:1:53: error: 'a' has an incomplete type 'int[]'
    1 | a[];main(c){for(;c=~getchar();)a[32|~c]++;for(c=97;a=c<123;)printf("%c : %d\n",c++,a[c]);}
      |                                                     ^
main.c:1:61: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | a[];main(c){for(;c=~getchar();)a[32|~c]++;for(c=97;a=c<123;)printf("%c : %d\n",c++,a[c]);}
      |                                                             ^~~~~~
main.c:1:61: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:61: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:61: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:1:1: warning: array 'a' assumed to have one element
    1 | a[];main(c){for(;c=~getchar();)a[32|~c]++;for(c=97;a=c<123;)printf("%c : %d\n",c++,a[c]);}
      | ^
Language: C++


#include<bits/stdc++.h>

using namespace std;
#define PI acos(-1)

int main(){
	char min[30];
	cin.getline(min,30,'\n');
	int box[26]={0};
	for(int i=0;min[i]!='\0';i++){
		min[i]=tolower(min[i]);
		switch(min[i]){
			case 'a' :box[0]++;break;
			case 'b' :box[1]++;break;
			case 'c' :box[2]++;break;
			case 'd' :box[3]++;break;
			case 'e' :box[4]++;break;
			case 'f' :box[5]++;break;
			case 'g' :box[6]++;break;
			case 'h' :box[7]++;break;
			case 'i' :box[8]++;break;
			case 'j' :box[9]++;break;
			
			case 'k' :box[10]++;break;
			case 'l' :box[11]++;break;
			case 'm' :box[12]++;break;
			case 'n' :box[13]++;break;
			case 'o' :box[14]++;break;
			case 'p' :box[15]++;break;
			case 'q' :box[16]++;break;
			case 'r' :box[17]++;break;
			case 's' :box[18]++;break;
			case 't' :box[19]++;break;
			
			case 'u' :box[20]++;break;
			case 'v' :box[21]++;break;
			case 'w' :box[22]++;break;
			case 'x' :box[23]++;break;
			case 'y' :box[24]++;break;
			case 'z' :box[25]++;break;
			}
	}
	
	for(int i=0;i<25;i++){
		printf("%c : ",'a'+i);
		coutbox[i]<<endl;
	}
		printf("%c : ",'z');
		coutbox[25]<<endl;
	
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:17: error: 'coutbox' was not declared in this scope
   47 |                 coutbox[i]<<endl;
      |                 ^~~~~~~
a.cc:50:17: error: 'coutbox' was not declared in this scope
   50 |                 coutbox[25]<<endl;
      |                 ^~~~~~~
Language: C++

#include<iostream>
#include<cstring>
using namespace std;
int main(){
int num[30];
char s[1024];
gets(s);
for(int i=0;i<strlen(s);i++){
for(int j=0;j<26;j++){
if(s[j]=='a'+j) num[j]++;
}
}
char kigou = 'a';
for(int i=0;i<26;i++) cout << kigou+i << " : " << num[i] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 | gets(s);
      | ^~~~
      | getw
Language: C++

#include<iostream>
#include<cstring>
#include<cstdlib>
using namespace std;
int main(){
  int num[30];
  char s[1024];
  gets(s);
  for(int i=0;i<strlen(s);i++){
    for(int j=0;j<26;j++){
      if(s[j]=='a'+j) num[j]++;
    }
  }
  char kigou = 'a';
  for(int i=0;i<26;i++) cout << kigou+i << " : " << num[i] << endl;
}

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

#include<iostream>
#include<cstring>
#include<stdlib.h>
using namespace std;
int main(){
  int num[30];
  char s[1024];
  gets(s);
  for(int i=0;i<strlen(s);i++){
    for(int j=0;j<26;j++){
      if(s[j]=='a'+j) num[j]++;
    }
  }
  char kigou = 'a';
  for(int i=0;i<26;i++) cout << kigou+i << " : " << num[i] << endl;
}

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

#include <iostream>
#include <cstdio>
#include <cctype>
using namespace std;
#define MAX_CHR 10000
int main(void) {
    char chr[MAX_CHR];
    int count[26];
    memset(count, 0, sizeof(count));
    while(scanf("%s", chr) != EOF) {
        for(int r = 0; chr[r] != '\0'; r++) {
            chr[r] = tolower(chr[r]);
            count[chr[r] - 'a']++;
        }
    }
    char idx = 'a';
    for(int r = 0; r < 26; r++) {
        cout << idx << " : " << count[r] << endl;
        idx++;
    }
    
    return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'memset' was not declared in this scope
    9 |     memset(count, 0, sizeof(count));
      |     ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <cctype>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

s = ""
s += raw_input()
res = "abcdefghijklmnopqrstuvwxyz"
for i in list(res) :
	print "{0} : {1}".format(i,s.lower().count(i))

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

#include <stdio.h>
#include <windows.h>

int main(){
	char ch;
	int count[26];
	int i,num;
	
	for(i = 0;i < 26; i++){
		count[i] = 0;
	}
	while ( scanf("%c", &ch) != EOF ){
		if(ch >= 'a' && ch <= 'z'){
			num = ch - 'a';  // 文字 ch の番号
			count[num]++;
		}else if(ch >= 'A' && ch <= 'Z'){
			num = ch - 'A';  // 文字 ch の番号
			count[num]++;
		}
	}
	for(i = 0; i < 26; i++){
		printf("%c : %d\n",'a'+ i,count[i]);
	}
}

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

#include <iostream>
#include <string>

using namespace std;
void printAlphabetCounts(int &cnt[26]){
 for (int i = 0; i < 26; i++){
  cout << (char)('a'+i) << " : " << cnt[i] << endl;
 }
}

void countAlphabet(int &cnt[26], string str){
 for (int i = 0; i<str.length(); i++){
  if ('a' <= str[i] && str[i] =<'z') {
   cnt[str[i]-'a']++;
   continue;
  }
  if ('A' <= str[i] && str[i] =<'Z'){
   cnt[str[i] -'A']++;
   continue;
  }
 }
}

int main(){
 // read input string
 string str;
 cin >> str;

 // count alphabets, case insensitive
 int cnt[26];
 for (int i = 0; i < 26; i++) cnt[i] = 0; // initialize the counter
 countAlphabet(cnt, str); 

 // print the results
 printAlphabetCounts(cnt);

 return 0;
}

Compiler output:
a.cc:5:31: error: declaration of 'cnt' as array of references
    5 | void printAlphabetCounts(int &cnt[26]){
      |                               ^~~
a.cc: In function 'void printAlphabetCounts(...)':
a.cc:7:37: error: 'cnt' was not declared in this scope; did you mean 'int'?
    7 |   cout << (char)('a'+i) << " : " << cnt[i] << endl;
      |                                     ^~~
      |                                     int
a.cc: At global scope:
a.cc:11:25: error: declaration of 'cnt' as array of references
   11 | void countAlphabet(int &cnt[26], string str){
      |                         ^~~
a.cc:11:32: error: expected ')' before ',' token
   11 | void countAlphabet(int &cnt[26], string str){
      |                   ~            ^
      |                                )
a.cc:11:41: error: expected initializer before 'str'
   11 | void countAlphabet(int &cnt[26], string str){
      |                                         ^~~
Language: C++

#include <iostream>

int main(){
	char c;
	int cnt[26] = {};

	while (cin.get(c)){
		c = tolower(c);
		if ('a' <= c && c <= 'z')
			cnt[c - 'a'] += 1;
	}

	for (int i = 0; i < 26; ++i){
		printf("%c : %d\r\n", 'a'+i, cnt[i]);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         while (cin.get(c)){
      |                ^~~
      |                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 <stdio.h>
#include <string>
#include <Math.h>
using namespace std;

int main() {
	string a;
	int i, b[26];

	for (i = 0; i < 26; i++) b[i] = 0;

	while (cin >> a) {
		if (a[i] = '0') break;
		for (i = 0; i < a.size(); i++) {
			if (a[i] >= 'a' && a[i] <= 'z') {
				b[(a[i] - 'a')]++;
			}else if (a[i] >= 'A' && a[i] <= 'Z') {
				b[(a[i] - 'A')]++;
			}
		}
	}

	for (i = 0; i < 26; i++) {
		cout << b[i] << endl;
	}

	return 0;

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

#include <iostream>
#include <stdio.h>
#include <string>
#include <Math.h>
using namespace std;

int main() {
	string a, c[26];
	int i, num, b[26];

	for (i = 0; i < 26; i++) b[i] = 0;

	while (cin >> a) {
		for (i = 0; i < a.size(); i++) {
			if (a[i] >= 'a' && a[i] <= 'z') {
				num = a[i] - 'a';
				b[num]++;
			}else if (a[i] >= 'A' && a[i] <= 'Z') {
				num = a[i] - 'A';
				b[num]++;
			}
		}
	}

	for (i = 0; i < 26; i++) {
		printf("%c : ", 'a' + i);
		cout << b[i] << endl;
	}

	return 0;
}

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

s = gets.chomp
a = []
for i in 0...26
  a[i]=0
end
s.downcase!
for i in 0...s.length
  a[ s[i].ord-"a".ord ] += 1
end
for i in 0...26
  print ("a".ord+i).chr, " : ", a[i], "\n"
end

Compiler output:
a.cc:3:10: error: too many decimal points in number
    3 | for i in 0...26
      |          ^~~~~~
a.cc:7:10: error: too many decimal points in number
    7 | for i in 0...s.length
      |          ^~~~~~~~~~~~
a.cc:10:10: error: too many decimal points in number
   10 | for i in 0...26
      |          ^~~~~~
a.cc:1:1: error: 's' does not name a type
    1 | s = gets.chomp
      | ^
Language: C++

s = ""
t = ""
while t=gets
  s += t.chomp
end
a = []
for i in 0...26
  a[i]=0
end
s.downcase!
for i in 0...s.length
  a[ s[i].ord-"a".ord ] += 1 if "a".ord <= s[i].ord && s[i].ord <= "z".ord
end
for i in 0...26
  print ("a".ord+i).chr, " : ", a[i], "\n"
end

Compiler output:
a.cc:7:10: error: too many decimal points in number
    7 | for i in 0...26
      |          ^~~~~~
a.cc:11:10: error: too many decimal points in number
   11 | for i in 0...s.length
      |          ^~~~~~~~~~~~
a.cc:14:10: error: too many decimal points in number
   14 | for i in 0...26
      |          ^~~~~~
a.cc:1:1: error: 's' does not name a type
    1 | s = ""
      | ^
Language: C++

using namespace std;

int main() {
	char c, a = 'a';
	int array[26];

	for(int i = 0; i < 26; i++) {
		array[i] = 0;
	}
	while(cin >> c) {
		if(('a' <= c)&&(c <= 'z')) {
			int num = c - 'a';
			array[num]++;
		} else if(('A' <= c)&&(c <= 'Z')) {
			int num = c - 'A';
			array[num]++;
		}
	}
	for(int i = 0; i < 26; i++) {
		cout << a << ":" << array[i] << endl;
		a++;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'cin' was not declared in this scope
   10 |         while(cin >> c) {
      |               ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:20:17: error: 'cout' was not declared in this scope
   20 |                 cout << a << ":" << array[i] << endl;
      |                 ^~~~
a.cc:20:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:49: error: 'endl' was not declared in this scope
   20 |                 cout << a << ":" << array[i] << endl;
      |                                                 ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

import java.util.*;



 
class Main {
    public static void main(String[] args){
        int a[];
        a=new int[100];
        int n=0;
        Scanner sc = new Scanner(System.in);
        String word = sc.next();
     
        
        for(int i=0;i<word.length();i++){
            a[Character.getNumericValue(word.charAt(i))-10]++;
        }
        for(int j=0;j<26;j++){
            System.out.printf("%c : %d\n",(char)(j)+'a',a[j]);

        }

    }
}

    

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:11: error: expected ':' before 'static'
    7 |     public static void main(String[] args){
      |           ^~~~~~~
      |           :
a.cc:7:29: error: 'String' has not been declared
    7 |     public static void main(String[] args){
      |                             ^~~~~~
a.cc:7:38: error: expected ',' or '...' before 'args'
    7 |     public static void main(String[] args){
      |                                      ^~~~
a.cc:24:2: error: expected ';' after class definition
   24 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:8:13: error: storage size of 'a' isn't known
    8 |         int a[];
      |             ^
a.cc:11:9: error: 'Scanner' was not declared in this scope
   11 |         Scanner sc = new Scanner(System.in);
      |         ^~~~~~~
a.cc:12:9: error: 'String' was not declared in this scope
   12 |         String word = sc.next();
      |         ^~~~~~
a.cc:15:23: error: 'word' was not declared in this scope
   15 |         for(int i=0;i<word.length();i++){
      |                       ^~~~
a.cc:16:15: error: 'Character' was not declared in this scope
   16 |             a[Character.getNumericValue(word.charAt(i))-10]++;
      |               ^~~~~~~~~
a.cc:19:13: error: 'System' was not declared in this scope
   19 |             System.out.printf("%c : %d\n",(char)(j)+'a',a[j]);
      |             ^~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {

	int alphabet[26] = {};
	
	string s;
	while (cin >> s) {
		for (int i = 0; i < s.size(); i++) {
			char c = s[i];
			if ('A' <= c && c <= 'Z') alphabet[c-'A']++;
			if ('a' <= c && c <= 'z') alphabet[c-'a']++;
		}
	}

	for (char c = 'a'; c <= z; c++) {
		printf("%c : &d\n", c, alphabet[c-'a']);
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:33: error: 'z' was not declared in this scope
   19 |         for (char c = 'a'; c <= z; c++) {
      |                                 ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {

	int alphabet[26] = {};
	
	string s;
	while (cin >> s) {
		for (int i = 0; i < s.size(); i++) {
			char c = s[i];
			if ('A' <= c && c <= 'Z') alphabet[c-'A']++;
			if ('a' <= c && c <= 'z') alphabet[c-'a']++;
		}
	}

	for (char c = 'a'; c <= 'z'; c++) {
		cont << c << " : " << alphabet[c-'a'] << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: 'cont' was not declared in this scope; did you mean 'const'?
   20 |                 cont << c << " : " << alphabet[c-'a'] << endl;
      |                 ^~~~
      |                 const
Language: C++

#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;

int main()
{
	//a-z:97-122 A-Z:65-90

	
	char input[1200+1];
	int num[26] = { 0 };
	cin.getline(input, sizeof(input));
	int tmp;

	for (int i = 0; i < strlen(input); i++)
	{
		tmp = (int)input[i];
		if (tmp >= 97) {
			num[tmp - 97] ++;
		} else {
			num[tmp - 65] ++;
		}
	}

	for (int i = 0; i < 26; i++)
	{
		cout << (char)(i + 97) << " : " << num[i] << endl;
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:29: error: 'strlen' was not declared in this scope
   16 |         for (int i = 0; i < strlen(input); i++)
      |                             ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <stdlib.h>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include <iostream>
#include <stdlib.h>
using namespace std;

int main()
{
	//a-z:97-122 A-Z:65-90

	
	char input[1200+1];
	int num[26] = { 0 };
	cin.getline(input, sizeof(input));
	int tmp;

	for (int i = 0; i < strlen(input); i++)
	{
		tmp = (int)input[i];
		if (tmp >= 97) {
			num[tmp - 97] ++;
		} else {
			num[tmp - 65] ++;
		}
	}

	for (int i = 0; i < 26; i++)
	{
		cout << (char)(i + 97) << " : " << num[i] << endl;
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: 'strlen' was not declared in this scope
   15 |         for (int i = 0; i < strlen(input); i++)
      |                             ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <stdlib.h>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

line = ""
while 1:
    try : line += raw_input()
    except : break
    for i in xrange(26):
        char = chr(i + 97)
        print '%s : %d' % (char , line.lower().count(char))

Compiler output:
a.cc:7:15: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    7 |         print '%s : %d' % (char , line.lower().count(char))
      |               ^~~~~~~~~
a.cc:1:1: error: 'line' does not name a type
    1 | line = ""
      | ^~~~
Language: C++

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {

	public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int alphabet[] = new int [26];
		char abc[] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
		String eibun;
		char n;
		int a;
		eibun = in.readLine();
		for(int i=0;i<eibun.length();i++){
			n = eibun.charAt(i);
			a = (int)n-(int)'a';
			alphabet[a]+=1;
		}
		for(int i= 0;i<26;i++){
			System.out.println(abc[i]+":"+alphabet[i]);
		}
	}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
Language: C++

#include<iostream>
using namespace std;

string s;
int ans[26];

int main(){
while(getline(cin.s)){
for(int i=0;i<s.size();i++){
if('a'<=s[i] && s[i]<='z')ans[s[i]-'a']++;
if('A'<=s[i] && s[i]<='Z')ans[s[i]-'A']++;
}
}
for(int i=0;i<26;i++){
cout << 'a'+i << " : " << ans[i] << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'std::istream' {aka 'class std::basic_istream<char>'} has no member named 's'
    8 | while(getline(cin.s)){
      |                   ^
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
using namespace std;
int main(){
	int count[26]={0};
	memset(count,0,sizeof(count));
	char ch;
	while(cin>>ch){
		ch = tolower(ch);
		if(isalpha(ch) != 0){
			int num = ch - 'a';
			count[num]++; 
		}
	}
	for(int i=0;i<26;i++){
		printf("%c : %d\n",'a'+i,count[i]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'memset' was not declared in this scope
    7 |         memset(count,0,sizeof(count));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 | #include <string>
Language: C++

#include <iostream>
using namespace std;
 
int main(void)
{
	int counter[26] = {0};

	char s[255];
	while( cin>>s){

		int num = 0;
		for(int i=0;i < strlen(s);i++){
		if(isupper(s[i]) ){ s[i] = tolower(s[i]); }
			num = s[i]-'a';
			counter[num]++;
		}
	}
	
	
	char a= 'a';
	for( int i=0;i<26;i++){
		cout << a << " : " <<counter[i] << endl;
		a+=1;
	}
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:33: error: 'strlen' was not declared in this scope
   12 |                 for(int i=0;i < strlen(s);i++){
      |                                 ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++


#include <iostream>
#include <string>
using namespace std;
 
int main(void)
{
	int counter[26] = {0};

	char s[255];
	while( cin>>s){

		int num = 0;
		for(int i=0;i < strlen(s);i++){
		if(isupper(s[i]) ){ s[i] = tolower(s[i]); }
			num = s[i]-'a';
			counter[num]++;
		}
	}
	
	
	char a= 'a';
	for( int i=0;i<26;i++){
		cout << a << " : " <<counter[i] << endl;
		a+=1;
	}
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: 'strlen' was not declared in this scope
   14 |                 for(int i=0;i < strlen(s);i++){
      |                                 ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <iostream>
  +++ |+#include <cstring>
    3 | #include <string>
Language: C++

#include<iostream>
#include<stdio.h>
#include<string>
using namespace std;
int main(void){
	char ch;
	int counter[26]={0};
	while(cin>>ch){
		
		if(ch<='A'&&ch>='Z')
			int num = ch - 'A';  // 文字 ch の番号
		else if (ch>='a'&&ch<='z')
			int num = ch - 'a';  // 文字 ch の番号

		counter[num]++;
	}
	for(int i=0;i<26;i++){
		ch='a'+i;
		cout<<ch<<":"<<counter[i]<<endl;
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: 'num' was not declared in this scope; did you mean 'enum'?
   15 |                 counter[num]++;
      |                         ^~~
      |                         enum