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

#include<stdio.h>

unsigned short SCAN_SENTENCE(unsigned char * str, unsigned short length_max);
void COUNT_ALPHABET(unsigned char * str, unsigned short * num_check, unsigned short length);

int main(){
	unsigned short usW_D_length;        	/* 文字列長格納の変数 */
	unsigned char ubW_D_str[1200];      	/* 文字列格納の配列 */
	unsigned short usW_D_num_check[26]; 	/* アルファベットの数を記録する配列 */
	unsigned short usW_C_i;             	/* ループ変数 */
	
	/* 文字列配列の初期化 */
	for(usW_C_i = 0;usW_C_i < 1200;usW_C_i++){
		ubW_D_str[usW_C_i] = 0;
	}
	/* アルファベットの数を記録する配列の初期化 */
	for(usW_C_i = 0;usW_C_i < 26;usW_C_i++){
		usW_D_num_check[usW_C_i] = 0;
	}
	
	/* 文字列入力 */
	usW_D_length = scan_sentence(ubW_D_str, 1200);
	
	/* アルファベットの数をカウント */
	count_alphabet(ubW_D_str, usW_D_num_check, usW_D_length);
	
	/* カウントした結果を出力 */
	for(usW_C_i = 0;usW_C_i < 26;usW_C_i++){
		/* a : (aの個数) の形式で出力 */
		printf("%c : %d\n", (usW_C_i + 97), *(usW_D_num_check + usW_C_i));
	}
	
	return 0;
}

/* 関数名：文字列入力 */
/* 概要：文字列を入力する。その長さを返す */
/* 引数：文字列を格納する配列の先頭アドレス、その配列の大きさ */
/* 戻り値：入力された文字列の長さ */
unsigned short SCAN_SENTENCE(unsigned char * str, unsigned short length_max)
{
	unsigned short usW_C_count_text = 0;	/* 文字列長カウンタ */
	unsigned short usW_C_i;             	/* ループ変数 */

	/* 文字列の入力 */
	for(usW_C_i = 0;usW_C_i < length_max;usW_C_i++){
		scanf("%c", str + usW_C_i);
		/* 入力終了の処理 */
		if(*(str + usW_C_i) == EOF){
			break;
		}
		/* 文字数をカウント */
		usW_C_count_text++;
	}

	/* 文字列長を返す */
	return usW_C_count_text;
}

/* 関数名：アルファベットカウント */
/* 概要：渡された文字列に各アルファベットが何文字含まれるか調べる */
/* 引数：文字列が格納された配列の先頭アドレス、アルファベットの数を記録する配列の先頭アドレス、文字列の長さ */
/* 戻り値：なし */
void COUNT_ALPHABET(unsigned char * str, unsigned short * num_check, unsigned short length)
{
	unsigned short usW_C_i;      	/* ループ変数 */
	unsigned char ubW_D_alphabet;	/* 計算用変数 */
	
	/* 文字列中に各アルファベットが何文字含まれるか調べる */
	for(usW_C_i = 0;usW_C_i < length;usW_C_i++){
		/* アルファベットの場合カウント */
		if(((65 <= *(str + usW_C_i)) && (*(str + usW_C_i) <= 90)) || ((97 <= *(str + usW_C_i)) && (*(str + usW_C_i) <= 122))){
			/* アルファベットを配列の添え字として使える形に加工 */
			ubW_D_alphabet = (*(str + usW_C_i) & 0x1F) - 1;
			/* 文字列中に含まれていたアルファベットをカウント */
			*(num_check + ubW_D_alphabet) += 1;
		}
	}
}




Compiler output:
main.c: In function 'main':
main.c:22:24: error: implicit declaration of function 'scan_sentence' [-Wimplicit-function-declaration]
   22 |         usW_D_length = scan_sentence(ubW_D_str, 1200);
      |                        ^~~~~~~~~~~~~
main.c:25:9: error: implicit declaration of function 'count_alphabet' [-Wimplicit-function-declaration]
   25 |         count_alphabet(ubW_D_str, usW_D_num_check, usW_D_length);
      |         ^~~~~~~~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
    char str[100];
    int c=0,count[26]={0},x;
    gets(str);
    while(str[c]!='\0'){
        if(str[c]>='a' && str[c]<='z'){
            x=str[c]-'a';
            count[x]++;

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

    }
     return 0;
}




Compiler output:
main.c: In function 'main':
main.c:7:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 |     gets(str);
      |     ^~~~
      |     fgets
Language: C

#include<stdio.h>
#include<ctype.h>
int main(void){
    char str[1201][1201];
    int i,j;
    int cnt[30]={0};
    for(i=0;i<1200;i++){
        gets(str[i]);
        if(str[i][0]=='\0')
            break;
    }
    for(j=0;str[j][0]!='\0';j++)
        for(i=0;str[j][i]!='\0';i++)
            str[j][i]=tolower(str[j][i]);
    for(j=0;str[j][0]!='\0';j++)
        for(i=0;str[j][i]!='\0';i++)
            if(str[j][i]>='a' && str[j][i]<='z')
                cnt[str[j][i]-'a']++;
    for(i=0;i<26;i++){
        printf("%c : %d\n",'a'+i,cnt[i]);
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |         gets(str[i]);
      |         ^~~~
      |         fgets
Language: C

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


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

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

int main(){
	int count[26];/*出現回数を数える変数を文字の種類分だけ用意*/
	for(int i=0;i<26;i++){
		count[i] = 0;
	}
	while(1){ //
		char s[1201];
		//int ret = scanf("%[^\n]",s);
		if(gets(s) == NULL){ 
			break;
		}

		int n = strlen(s); //文字列の長さを返す
		//while (s[i] == true){/*配列strのi番目の文字がNULL文字(文字列の終端)ではない間*/
		for(int i = 0;i<n;i++){
			if (s[i] >= 'a' && s[i] <= 'z'){
				count[(int)s[i] - 'a']++;/*小文字*/
			}
			else if (s[i] >= 'A' && s[i] <= 'Z'){
				count[(int)s[i] - 'A']++;/*大文字*/

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


	/*
	   与えられた英文に含まれる
	   各アルファベットの数を数えるプログラムを作成して下さいなお
	   小文字と大文字は区別しません。
	   */





Compiler output:
main.c: In function 'main':
main.c:12:20: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   12 |                 if(gets(s) == NULL){
      |                    ^~~~
      |                    fgets
main.c:12:28: warning: comparison between pointer and integer
   12 |                 if(gets(s) == NULL){
      |                            ^~
Language: C

#include <stdio.h>

int main(void) {
  int num,i;
  char ch;
  int counter[26];

  for(i = 0; i < 26; i++){
    counter[i] = 0;
  }

  while(ch != '.' || ch != z){
    scanf("%c",&ch);
    if(65 <= ch && ch <= 90){
      num = ch - 'A';
    }
    else{
      num = ch - 'a';
    }
    counter[num]++;
  }
  for(i = 0; i < 26; i++){
    ch = i + 'a';
    printf("%c : %d\n",ch,counter[i]);
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:28: error: 'z' undeclared (first use in this function)
   12 |   while(ch != '.' || ch != z){
      |                            ^
main.c:12:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void) {
  int num,i,a = 1;
  char ch,chara = '.',charb = 'z';
  int counter[26];

  for(i = 0; i < 26; i++){
    counter[i] = 0;
  }

  while(ch != chara && ch != 'charb'){
    scanf("%c",&ch);
    if(a == 1){
      if(ch == 'a'){
        charb = g;
      }
    }
    if(a == )
    if(a == 3){
      if(ch == 'e'){
        chara == '@';//9番目のピリオド
      }
    }
    if(a == 1100){
      chara == '.';
    }
    if(65 <= ch && ch <= 90){
      num = ch - 'A';
    }
    else{
      num = ch - 'a';
    }
    counter[num]++;
    a++;
  }
  for(i = 0; i < 26; i++){
    ch = i + 'a';
    printf("%c : %d\n",ch,counter[i]);
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:30: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   12 |   while(ch != chara && ch != 'charb'){
      |                              ^~~~~~~
main.c:16:17: error: 'g' undeclared (first use in this function)
   16 |         charb = g;
      |                 ^
main.c:16:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:13: error: expected expression before ')' token
   19 |     if(a == )
      |             ^
Language: C

#include <stdio.h>

int main(void){
  char w;
  int alphabet[26];
  int i, j ,n;

  for (i = 0; i < 26; i++){
    alphabet[i] = 0;
  }

  i = 0;
  while(1){
    scanf("%c" w);
    if (w >= 'A' && 'Z' <= w){
      n = w - 'A';
      alphabet[n] += 1;
    }else if (w >= 'a' && 'z' <= w){
      n = w - 'a';
      alphabet[n] += 1;
    }else if (w == EOF){
      break;
    }
    i++;
  }

  for (j = 97; j < 123; j++){
    printf("%c : %d\n", j, alphabet[j-97]);
  }

  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:14:15: error: expected ')' before 'w'
   14 |     scanf("%c" w);
      |          ~    ^~
      |               )
Language: C

include <stdio.h>
#include <ctype.h>
     
int main(void)
{
int i,j,sum[26];
char ABC;
scanf("%c",&ABC);
while(ABC != EOF)
     
/*EOF(ファイル終了[End Of File])でないかどうか確認*/
     
{
if (isalpha(ABC) != 0)
     
/*入力されたものがアルファベットかどうか確認*/
     
{
j = (tolower(ABC) - 'a');
sum[j] += 1;
     
/*入力されたアルファベットを小文字に変換&0~25の数値に変換*/
     
}
scanf("%c",&ABC);
}
for(i = 0;i <= 25;i++)
{
printf("'%c' : %d\n",'(a + i)',sum[i]);
}
return 0;
}


Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'main':
main.c:8:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 | scanf("%c",&ABC);
      | ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include <ctype.h>
  +++ |+#include <stdio.h>
    3 | 
main.c:8:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 | scanf("%c",&ABC);
      | ^~~~~
main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:14: error: 'EOF' undeclared (first use in this function)
    9 | while(ABC != EOF)
      |              ^~~
main.c:9:14: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:9:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:29:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   29 | printf("'%c' : %d\n",'(a + i)',sum[i]);
      | ^~~~~~
main.c:29:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:29:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:29:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:29:22: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
   29 | printf("'%c' : %d\n",'(a + i)',sum[i]);
      |                      ^~~~~~~~~
Language: C

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


Compiler output:
main.c:1:18: error: missing terminating > character
    1 | #include <stdio.h
      |                  ^
main.c:2:1: error: expected identifier or '(' before '>' token
    2 | >#include <ctype.h>
      | ^
main.c:2:2: error: stray '#' in program
    2 | >#include <ctype.h>
      |  ^
Language: C

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


Compiler output:
main.c:1:18: error: missing terminating > character
    1 | #include <stdio.h
      |                  ^
main.c:2:1: error: expected identifier or '(' before '>' token
    2 | >#include <ctype.h>
      | ^
main.c:2:2: error: stray '#' in program
    2 | >#include <ctype.h>
      |  ^
Language: C

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


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

#include <stdio.h>
int main()
{
  int count[26] = {};
  int n, i;
  char ch;
  while( scanf("%c", &ch) != EOF ){
    if(ch >= 'a' && ch <= 'z'){  
  n = ch - 'a';
  count[n]++;
    }
    else if(ch >= 'A' && ch <= 'Z'){
      n = ch - 'A';
      count[n]++;
    }
  }
  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:20:3: error: expected declaration or statement at end of input
   20 |   return 0;
      |   ^~~~~~
Language: C

import java.util.Scanner;

public class Main{
	public static void main(String[]args){
		Scanner sc = new Scanner(System.in);
		String s = new String();
		int num;
		int counter[] = new int[26];
		while(sc.hasNext()){
			s = sc.next();
			char c[] = new char[s.length()+1];
			c = s.toCharArray();
			for(int i=0; i<s.length(); i++){
				num = Character.toLowerCase(c[i])-'a';
				if(!(num<0)) counter[num]++;
			}
			for(int i=0; i<26; i++){
				System.out.println((char)(i+'a')+" "+ ": "+ counter[i]);
			}
		}
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.Scanner;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Scanner;
      |            ^
main.c:3:1: error: unknown type name 'public'
    3 | public class Main{
      | ^~~~~~
main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    3 | public class Main{
      |              ^~~~
Language: C++

#include<bits/stdc++.h>
#include<string.h>
using namespace std;
int main()
{
    int i,j,k,sum,count=0;     //a=97
    char ch[1200],ar[26]={0},cap[26]={0};
    gets(ch);
    int len=strlen(ch);
    for(i=0;ch[i]!='\0';)
    {
        if(ch[i]>='a' && ch[i]<='z')
        {
            sum=ch[i]-'a';
            ar[sum]++;
        }
        if(ch[i]>='A' && ch[i]<='Z')
        {
             sum=ch[i]-'A';
            ar[sum]++;
        }
        i++;
    }

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



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

#include<bits/stdc++.h>
#include<string.h>
using namespace std;
int main()
{
    int i,j,k,sum,count=0;     //a=97
    char ch[200],ar[26]={0},cap[26]={0};
    gets(ch);
    int len=strlen(ch);
    for(i=0;ch[i]!='\0';)
    {
        if(ch[i]>='a' && ch[i]<='z')
        {
            sum=ch[i]-'a';
            ar[sum]++;
        }
        if(ch[i]>='A' && ch[i]<='Z')
        {
             sum=ch[i]-'A';
            ar[sum]++;
        }
        i++;
    }

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



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

#include<bits/stdc++.h>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
    int i,j,k,sum,count=0;     //a=97
    char ch[200],ar[26]={0},cap[26]={0};
    gets(ch);
    int len=strlen(ch);
    for(i=0;ch[i]!='\0';)
    {
        if(ch[i]>='a' && ch[i]<='z')
        {
            sum=ch[i]-'a';
            ar[sum]++;
        }
        if(ch[i]>='A' && ch[i]<='Z')
        {
             sum=ch[i]-'A';
            ar[sum]++;
        }
        i++;
    }

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



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

#include<bits/stdc++.h>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
    int i,j,k,sum,count=0;     //a=97
    char ch[1200],ar[26]={0},cap[26]={0};
    gets(ch);
    int len=strlen(ch);
    for(i=0;ch[i]!='\0';)
    {
        if(ch[i]>='a' && ch[i]<='z')
        {
            sum=ch[i]-'a';
            ar[sum]++;
        }
        if(ch[i]>='A' && ch[i]<='Z')
        {
             sum=ch[i]-'A';
            ar[sum]++;
        }
        i++;
    }

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



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

#include<bits/stdc++.h>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
    int i,j,k,sum;     //a=97
    char ch[1200],ar[26]={0};
    gets(ch);
    for(i=0;ch[i]!='\0';)
    {
        if(ch[i]>='a' && ch[i]<='z')
        {
            sum=ch[i]-'a';
            ar[sum]++;
        }
        if(ch[i]>='A' && ch[i]<='Z')
        {
             sum=ch[i]-'A';
            ar[sum]++;
        }
        i++;
    }

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



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

#include<bits/stdc++.h>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
    int i,j,k,sum;     //a=97
    char ch[1200],ar[26]={0};
    gets(ch);
    for(i=0;ch[i]!='\0';)
    {
        if(ch[i]>='a' && ch[i]<='z')
        {
            sum=ch[i]-'a';
            ar[sum]++;
        }
    else if(ch[i]>='A' && ch[i]<='Z')
        {
             sum=ch[i]-'A';
            ar[sum]++;
        }
        i++;
    }

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



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

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

int main(){
    int a[26] = {};
    string char;
    
    for(int i = 0; cin >> char[i]; i++){
        if(char[i] >= 'a' && char[i] <= 'z') a[char[i]-'a']++;
        else if(char[i] >= 'A' && char[i] <= 'Z') a[char[i]-'A']++;
    }
     for(i=0;i<26;i++){
    cout << (char)('a'+i) << " : " << ab[i] << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: multiple types in one declaration
    7 |     string char;
      |     ^~~~~~
a.cc:7:12: error: declaration does not declare anything [-fpermissive]
    7 |     string char;
      |            ^~~~
a.cc:9:27: error: expected primary-expression before 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                           ^~~~
a.cc:9:26: error: expected ';' before 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                          ^~~~~
      |                          ;
a.cc:9:27: error: expected primary-expression before 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                           ^~~~
a.cc:9:26: error: expected ')' before 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |        ~                 ^~~~~
      |                          )
a.cc:9:31: error: structured binding declaration cannot have type 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                               ^~~
a.cc:9:31: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:9:32: error: redeclaration of 'auto i'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                                ^
a.cc:9:13: note: 'int i' previously declared here
    9 |     for(int i = 0; cin >> char[i]; i++){
      |             ^
a.cc:9:34: error: expected initializer before ';' token
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                                  ^
a.cc:9:36: error: 'i' was not declared in this scope
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                                    ^
a.cc:14:39: error: 'ab' was not declared in this scope; did you mean 'a'?
   14 |     cout << (char)('a'+i) << " : " << ab[i] << endl;
      |                                       ^~
      |                                       a
Language: C++

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

int main(){
    int a[26] = {};
    string char;
    
    for(int i = 0; cin >> char[i]; i++){
        if(char[i] >= 'a' && char[i] <= 'z') a[char[i]-'a']++;
        else if(char[i] >= 'A' && char[i] <= 'Z') a[char[i]-'A']++;
    }
     for(i=0;i<26;i++){
    cout << (char)('a'+i) << " : " << a[i] << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: multiple types in one declaration
    7 |     string char;
      |     ^~~~~~
a.cc:7:12: error: declaration does not declare anything [-fpermissive]
    7 |     string char;
      |            ^~~~
a.cc:9:27: error: expected primary-expression before 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                           ^~~~
a.cc:9:26: error: expected ';' before 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                          ^~~~~
      |                          ;
a.cc:9:27: error: expected primary-expression before 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                           ^~~~
a.cc:9:26: error: expected ')' before 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |        ~                 ^~~~~
      |                          )
a.cc:9:31: error: structured binding declaration cannot have type 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                               ^~~
a.cc:9:31: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:9:32: error: redeclaration of 'auto i'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                                ^
a.cc:9:13: note: 'int i' previously declared here
    9 |     for(int i = 0; cin >> char[i]; i++){
      |             ^
a.cc:9:34: error: expected initializer before ';' token
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                                  ^
a.cc:9:36: error: 'i' was not declared in this scope
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                                    ^
Language: C++

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

int main(){
    int a[26] = {};
    string char;
    
    for(int i = 0; cin >> char[i]; i++){
        if(char[i] >= 'a' && char[i] <= 'z') a[char[i]-'a']++;
        else if(char[i] >= 'A' && char[i] <= 'Z') a[char[i]-'A']++;
    }
     for(int i=0;i<26;i++){
    cout << (char)('a'+i) << " : " << a[i] << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: multiple types in one declaration
    7 |     string char;
      |     ^~~~~~
a.cc:7:12: error: declaration does not declare anything [-fpermissive]
    7 |     string char;
      |            ^~~~
a.cc:9:27: error: expected primary-expression before 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                           ^~~~
a.cc:9:26: error: expected ';' before 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                          ^~~~~
      |                          ;
a.cc:9:27: error: expected primary-expression before 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                           ^~~~
a.cc:9:26: error: expected ')' before 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |        ~                 ^~~~~
      |                          )
a.cc:9:31: error: structured binding declaration cannot have type 'char'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                               ^~~
a.cc:9:31: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:9:32: error: redeclaration of 'auto i'
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                                ^
a.cc:9:13: note: 'int i' previously declared here
    9 |     for(int i = 0; cin >> char[i]; i++){
      |             ^
a.cc:9:34: error: expected initializer before ';' token
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                                  ^
a.cc:9:36: error: 'i' was not declared in this scope
    9 |     for(int i = 0; cin >> char[i]; i++){
      |                                    ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: multiple types in one declaration
    7 |     string char;
      |     ^~~~~~
a.cc:7:12: error: declaration does not declare anything [-fpermissive]
    7 |     string char;
      |            ^~~~
a.cc:9:18: error: expected primary-expression before 'char'
    9 |     while(cin >> char){
      |                  ^~~~
a.cc:9:17: error: expected ')' before 'char'
    9 |     while(cin >> char){
      |          ~      ^~~~~
      |                 )
a.cc:9:22: error: expected unqualified-id before ')' token
    9 |     while(cin >> char){
      |                      ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: multiple types in one declaration
    7 |     string char;
      |     ^~~~~~
a.cc:7:12: error: declaration does not declare anything [-fpermissive]
    7 |     string char;
      |            ^~~~
a.cc:9:18: error: expected primary-expression before 'char'
    9 |     while(cin >> char){
      |                  ^~~~
a.cc:9:17: error: expected ')' before 'char'
    9 |     while(cin >> char){
      |          ~      ^~~~~
      |                 )
a.cc:9:22: error: expected unqualified-id before ')' token
    9 |     while(cin >> char){
      |                      ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
   15 |     cout << (ch)('a'+i) << " : " << a[i] << endl;
      |             ~~~~^~~~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define int long long
int mod=1e9+7;

signed main(){
  string s;
  while(getline(cin,s)){
    map<char,int> mp;
    for(int i=0;i<s.size();i++)mp[s[i]]++;
  }
  for(int i=0;i<26;i++){
    int x='a'+i;
    putchar(x);
    cout<<" : "<<mp['a'+i]+mp['A'+i]<<endl;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: 'mp' was not declared in this scope
   15 |     cout<<" : "<<mp['a'+i]+mp['A'+i]<<endl;
      |                  ^~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
#include <math.h>
#include <string>
#include <queue>
#include <map>
#include <set>
#include <functional>

using namespace std;

typedef long long int ll;
typedef std::pair<int, int> pii;
typedef std::pair<ll, int> pli;
typedef std::pair<ll, ll> pll;

#define FOR(i,n,m) for(ll i=(ll)(m);i<(ll)(n);++i)
#define REP(i,n) FOR(i,n,0)
#define IREP(i,n) for(ll i=(ll)(n);i>=0;--i)
#define OF64 std::setprecision(10)

const ll MOD = 1000000007;
const ll INF = (ll)1e15;

int a[30];

int main()
{
	//string S;
	//getline(cin, S);

	REP(i, 1200)
	{
		char c;
		cin >> c;
		int n = tolower(c) - 'a';
		if (n >= 0 && n < 26)
		{
			a[n]++;
		}
		if (std::ios::eof)
		{
			break;
		}
	}

	REP(i, 26)
	{
		cout << (char)('a' + i) << " : " << a[i] << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:31: error: invalid use of non-static member function 'bool std::basic_ios<_CharT, _Traits>::eof() const [with _CharT = char; _Traits = std::char_traits<char>]'
   44 |                 if (std::ios::eof)
      |                               ^~~
Language: C++

//標準解答
#include<cstdio>
#include<cstring>

int main(){ //入力数は不定
  char s[201], t[101], p[101];
  
  scanf("%s %s", s, p);
  strcpy(t, s); //2に1をcopy
  strcat(s, t); //sにtを連結
  
　if ( strstr(s, p) == NULL ) printf("No\n");
　//sにpが見つかるか
　else printf("Yes\n");
　
　return 0;
}


Compiler output:
a.cc:12:1: error: extended character 　 is not valid in an identifier
   12 | 　if ( strstr(s, p) == NULL ) printf("No\n");
      | ^
a.cc:13:1: error: extended character 　 is not valid in an identifier
   13 | 　//sにpが見つかるか
      | ^
a.cc:14:1: error: extended character 　 is not valid in an identifier
   14 | 　else printf("Yes\n");
      | ^
a.cc:15:1: error: extended character 　 is not valid in an identifier
   15 | 　
      | ^
a.cc:16:1: error: extended character 　 is not valid in an identifier
   16 | 　return 0;
      | ^
a.cc: In function 'int main()':
a.cc:12:1: error: '\U00003000if' was not declared in this scope
   12 | 　if ( strstr(s, p) == NULL ) printf("No\n");
      | ^~~~
a.cc:13:1: error: '\U00003000' was not declared in this scope
   13 | 　//sにpが見つかるか
      | ^~
a.cc:15:3: error: expected ';' before '\U00003000return'
   15 | 　
      |   ^
      |   ;
   16 | 　return 0;
      | ~~~~~~~~
Language: C++

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

int main() {
    string s;
    getline(cin, s);
    for (char c = 'a'; c <= 'z'; c++)
        cout << c << " : " << s.conut(c) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'conut'
   10 |         cout << c << " : " << s.conut(c) << endl;
      |                                 ^~~~~
Language: C++

#include <iostream>
#include <string>
#include <cctype>

using namespace std;

int main()
{
	string s;
	unsigned int n[26];
    for (unsigned int i = 0; i < 26; ++i)
		n[i] = 0;
	    getline(cin, s);

		for (unsigned int i = 0; i < s.length(); ++i) {
			if (islower(s[i]))
				n[s[i]-'a']++;
			else if (isupper(s[i]))
			    n[s[i]-'A']++;
		}
		
		for (unsigned int i = 0; i < 26; ++i) {
			// cout << (char)('a' + i)  << " : " << n[i] << endl;
			printf("%c : %d\n", ('a' + i,  n[i]);
		}

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:24:61: error: expected ')' before ';' token
   24 |                         printf("%c : %d\n", ('a' + i,  n[i]);
      |                               ~                             ^
      |                                                             )
Language: C++

#include <iostream>
#include <string>
#include <cctype>

using namespace std;

int main()
{
	unsigned int n[27];
    for (unsigned int i = 0; i < 26; ++i)
		n[i] = 0;

	char ch;
	while (cin >> ch) {
		if (islower(ch))
			n[ch-'a']++;
		else if (isupper(ch))
			n[ch-'A']++;
		count++;
	}


		for (unsigned int i = 0; i < 26; ++i) {
			cout << (char)('a' + i)  << " : " << n[i] << endl;
		}

	return 0;
}



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

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

int main() {
    string str;
    getline(cin, str);
    
    array<int, 26> arr;
    
    for (long unsigned int i = 0; i < str.length(); i++) {
        if ('a' <= str[i] && str[i] <= 'z') {
            arr[str[i] - 'a']++;
        } else if ('A' <= str[i] && str[i] <= 'Z') {
            arr[str[i] - 'A']++;
        }
    }
    
    for (int i = 0; i < 25; i++) {
        cout << static_cast<char>('a' + i) << " : " << arr[i] << " " << endl;
    }
    cout << static_cast<char>('a' + 25) << " : " << arr[i] << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:57: error: 'i' was not declared in this scope
   21 |     cout << static_cast<char>('a' + 25) << " : " << arr[i] << endl;
      |                                                         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int ln,a[100],x,i;
    memset(a,0,sizeof(a));
    char s[1009];
    gets(s);
    ln=strlen(s);
    for(i=0;i<ln;i++)
    {
        if(s[i]!=32)
        {
            if(s[i]>=97)
            x=s[i]-'a';
            else
                x=s[i]-'A';
            a[x]++;
        }

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



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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int ln,a[100],x,i;
    memset(a,0,sizeof(a));
    char s[1009];
    gets(s);
    ln=strlen(s);
    for(i=0;i<ln;i++)
    {
        if(s[i]!=' ')
        {
            if(s[i]>=97)
            x=s[i]-'a';
            else
                x=s[i]-'A';
            a[x]++;
        }

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



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

#include<stdio.h>
#include<string.h>
int main()
{
    int ln,a[100],x,i;
    memset(a,0,sizeof(a));
    char s[1009];
    gets(s);
    ln=strlen(s);
    for(i=0;i<ln;i++)
    {
        if(s[i]!=' ')
        {
            if(s[i]>=97)
            x=s[i]-'a';
            else
                x=s[i]-'A';
            a[x]++;
        }

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



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

#include<bits/stdc++.h>
using namespace std;
main()
{
    char a[1210];
    int i;
    int K=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,I=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,B=0;
    gets(a);
    for(i=0;a[i]!='\0';i++)
    {
      if((a[i])=='a'|| (a[i]=='A'))
        K++;
      else if(a[i]=='b' || a[i]=='B')
        b++;
      else if(a[i]=='c' || a[i]=='C')
        c++;
        else if(a[i]=='d' || a[i]=='D')
        d++;
        else if(a[i]=='e' || a[i]=='E')
        e++;
        else if(a[i]=='f' || a[i]=='F')
        f++;
        else if(a[i]=='g' || a[i]=='G')
        g++;
        else if(a[i]=='h' || a[i]=='H')
        h++;
        else if(a[i]=='i' || a[i]=='I')
        I++;
        else if(a[i]=='j' || a[i]=='J')
        j++;
        else if(a[i]=='k' || a[i]=='K')
        k++;
        else if(a[i]=='l' || a[i]=='L')
        l++;
        else if(a[i]=='m' || a[i]=='M')
        m++;
        else if(a[i]=='n' || a[i]=='N')
        n++;
        else if(a[i]=='o' || a[i]=='O')
        o++;
        else if(a[i]=='p' || a[i]=='P')
        p++;
        else if(a[i]=='q' || a[i]=='Q')
        q++;
        else if(a[i]=='r' || a[i]=='R')
        r++;
        else if(a[i]=='s' || a[i]=='S')
        s++;
        else if(a[i]=='t' || a[i]=='T')
        t++;
        else if(a[i]=='u' || a[i]=='U')
        u++;
        else if(a[i]=='v' || a[i]=='V')
        v++;
        else if(a[i]=='w' || a[i]=='W')
        w++;
        else if(a[i]=='x' || a[i]=='X')
        x++;
        else if(a[i]=='y' || a[i]=='Y')
        y++;
        else if(a[i]=='z' || a[i]=='Z')
        z++;
        else
            B++;
    }
    printf("a : %d\n",K);
    printf("b : %d\n",b);
    printf("c : %d\n",c);
    printf("d : %d\n",d);
    printf("e : %d\n",e);
    printf("f : %d\n",f);
    printf("g : %d\n",g);
    printf("h : %d\n",h);
    printf("i : %d\n",I);
    printf("j : %d\n",j);
    printf("k : %d\n",k);
    printf("l : %d\n",l);
    printf("m : %d\n",m);
    printf("n : %d\n",n);
    printf("o : %d\n",o);
    printf("p : %d\n",p);
    printf("q : %d\n",q);
    printf("r : %d\n",r);
    printf("s : %d\n",s);
    printf("t : %d\n",t);
    printf("u : %d\n",u);
    printf("v : %d\n",v);
    printf("w : %d\n",w);
    printf("x : %d\n",x);
    printf("y : %d\n",y);
    printf("z : %d\n",z);
}



Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |     gets(a);
      |     ^~~~
      |     getw
Language: C++

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

int main(){
char ch;
int NUM = 26;
int sum[NUM];

for ( int i = 0; i < NUM; i++ ){ 
  sum[i] = 0;
}

while(1){
  cin >> ch;
  if(isalpha(ch){
    sum[ch - "a"] += 1;
  }
for ( int i = 0; i < NUM; i++ ){ 
 cout << sum[i] << endl;
}
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: expected ')' before '{' token
   19 |   if(isalpha(ch){
      |     ~           ^
      |                 )
a.cc:22:18: error: 'i' was not declared in this scope
   22 | for ( int i = 0; i < NUM; i++ ){
      |                  ^
Language: C++

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

int main(){
char ch;
int NUM = 26;
int sum[NUM];

for ( int i = 0; i < NUM; i++ ){ 
  sum[i] = 0;
}

while(cin >> ch){
  if(isalpha(ch){
    sum[ch - 'a'] += 1;
  }
for ( int i = 0; i < NUM; i++ ){ 
 cout << sum[i] << endl;
}
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: expected ')' before '{' token
   18 |   if(isalpha(ch){
      |     ~           ^
      |                 )
a.cc:21:18: error: 'i' was not declared in this scope
   21 | for ( int i = 0; i < NUM; i++ ){
      |                  ^
Language: C++

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

int main(){
char ch;
int NUM = 26;
int sum[NUM];

for ( int i = 0; i < NUM; i++){ 
  sum[i] = 0;
}

while(cin >> ch){
  if(isalpha(ch){
    sum[ch - 'a']++;
  }
for ( int i = 0; i < NUM; i++){ 

// cout << 'a'+0 << " : " << sum[i] << endl;
  printf("%s : %d",'a'+i,sum[i] );
}
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: expected ')' before '{' token
   18 |   if(isalpha(ch){
      |     ~           ^
      |                 )
a.cc:21:18: error: 'i' was not declared in this scope
   21 | for ( int i = 0; i < NUM; i++){
      |                  ^
Language: C++

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

int main(){
char ch;
int NUM = 26;
int num = 0;
int sum[NUM];

for ( int i = 0; i < NUM; i++){ 
  sum[i] = 0;
}

while(cin >> ch){
  if(isalpha(ch){
    sum[ch - 'a']++;
  }
for ( int i = 0; i < NUM; i++){ 

// cout << 'a'+0 << " : " << sum[i] << endl;
num = 'a';
  printf("%s : %d",num+i,sum[i] );
}
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: expected ')' before '{' token
   19 |   if(isalpha(ch){
      |     ~           ^
      |                 )
a.cc:22:18: error: 'i' was not declared in this scope
   22 | for ( int i = 0; i < NUM; i++){
      |                  ^
Language: C++

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

int main(){
char ch;
int NUM = 26;
int num = 'a';
int sum[NUM];

for ( int i = 0; i < NUM; i++){ 
  sum[i] = 0;
}

while(cin >> ch){
  if(isalpha(ch){
    sum[ch - 'a']++;
  }
for ( int i = 0; i < NUM; i++){ 

// cout << 'a'+0 << " : " << sum[i] << endl;
  printf("%s : %d\n" , num+i , sum[i] );
}
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: expected ')' before '{' token
   19 |   if(isalpha(ch){
      |     ~           ^
      |                 )
a.cc:22:18: error: 'i' was not declared in this scope
   22 | for ( int i = 0; i < NUM; i++){
      |                  ^
Language: C++

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

int main(){
char ch;
int NUM = 26;
int num = 'a';
int sum[NUM];

for ( int i = 0; i < NUM; i++){ 
  sum[i] = 0;
}

while(cin >> ch){
  if(isalpha(ch){
    sum[ch - 'a']++;
  }
for ( int i = 0; i < NUM; i++){ 

// cout << 'a'+0 << " : " << sum[i] << endl;
  printf("%s : %d\n" , num+i , sum[i] );
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: expected ')' before '{' token
   19 |   if(isalpha(ch){
      |     ~           ^
      |                 )
a.cc:22:18: error: 'i' was not declared in this scope
   22 | for ( int i = 0; i < NUM; i++){
      |                  ^
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

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

int main(){
char ch;
int NUM = 26;
int num = 'a';
int sum[NUM];

for ( int i = 0; i < NUM; i++){ 
  sum[i] = 0;
}

while(cin >> ch){
  if(isalpha(ch){
    sum[ch - 'a']++;
  }
}
for ( int i = 0; i < NUM; i++){ 
// cout << 'a'+0 << " : " << sum[i] << endl;
  printf("%s : %d\n" , num+i , sum[i] );
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: expected ')' before '{' token
   19 |   if(isalpha(ch){
      |     ~           ^
      |                 )
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
Language: C++

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

int main(){
char ch;
int NUM = 26;
char num = 'a';
int sum[NUM];

for ( int i = 0; i < NUM; i++){ 
  sum[i] = 0;
}

while(cin >> ch){
  if(isalpha(ch){
    sum[ch - 'a']++;
  }
}
for ( int i = 0; i < NUM; i++){ 
// cout << 'a'+0 << " : " << sum[i] << endl;
  printf("%s : %d\n" , num+i , sum[i] );
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: expected ')' before '{' token
   19 |   if(isalpha(ch){
      |     ~           ^
      |                 )
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
Language: C++

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

int main(){
char ch;
int NUM = 26;
int num = 'a';
int sum[NUM];

for ( int i = 0; i < NUM; i++){ 
  sum[i] = 0;
}

while(cin >> ch){
  if(isalpha(ch){
    sum[ch - 'a']++;
  }
}
for ( int i = 0; i < NUM; i++){ 
// cout << 'a'+0 << " : " << sum[i] << endl;
  printf("%c : %d\n" , num+i , sum[i] );
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: expected ')' before '{' token
   19 |   if(isalpha(ch){
      |     ~           ^
      |                 )
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
Language: C++

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

int main(){
char ch;
int NUM = 26;
int num = 'a';
int sum[NUM];

for ( int i = 0; i < NUM; i++){ 
  sum[i] = 0;
}

while(cin >> ch){
  if(isalpha(ch){
    sum[ch - 'a']++;
  }
}
for ( int i = 0; i < NUM; i++){ 
  printf("%c : %d\n" , num+i , sum[i] );
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: expected ')' before '{' token
   19 |   if(isalpha(ch){
      |     ~           ^
      |                 )
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
Language: C++

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

int main(){
char ch;
int NUM = 26;
int num = 'a';
int sum[NUM];

for ( int i = 0; i < NUM; i++){ 
  sum[i] = 0;
}

while(cin >> ch){
  if(isalpha(ch)){
       if(islower(ch){//小文字
           sum[ch - 'a']++;
       }
       if(isupper(ch){//大文字
           sum[ch - 'A']++;
       }
  }
}
for ( int i = 0; i < NUM; i++){ 
  printf("%c : %d\n" , num+i , sum[i] );
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:22: error: expected ')' before '{' token
   20 |        if(islower(ch){//小文字
      |          ~           ^
      |                      )
a.cc:26:3: error: expected primary-expression before '}' token
   26 |   }
      |   ^
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String line = sc.nextLine();
		line = line.toLowerCase();
		String text = "";
		char[] c = new char[line.length()];

		for (int i = 0; i < line.length(); i++) {
			c[i] = line.charAt(i);
			if (c[i] != ' ') {
				text += c[i];
			}
		}

		char[] newc = new char[text.length()];
		if (text.length() > 1200) {
			System.exit(0);
		}
		for (int j = 'a'; j <= 'z'; j++) {
			int count = 0;
			for (int i = 0; i < text.length(); i++) {
				newc[i] = text.charAt(i);
				if (newc[i] == (char) j) {
					count++;
				}

			}

			System.out.println((char) j + " ; " + count);

			sc.close();
		}

	}

}


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

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String line = sc.nextLine();
		line = line.toLowerCase();
		String text = "";
		char[] c = new char[line.length()];

		for (int i = 0; i < line.length(); i++) {
			c[i] = line.charAt(i);
			if (c[i] != ' ') {
				text += c[i];
			}
		}

		char[] newc = new char[text.length()];
		if (text.length() > 1200) {
			System.exit(0);
		}
		for (int j = 'a'; j <= 'z'; j++) {
			int count = 0;
			for (int i = 0; i < text.length(); i++) {
				newc[i] = text.charAt(i);
				if (newc[i] == (char) j) {
					count++;
				}

			}

			System.out.println((char) j + "；" + count);

			sc.close();
		}

	}

}


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

//
//  main.cpp
//  compile
//
//  Created by x17032xx on 2019/04/26.
//  Copyright © 2019年 AIT. All rights reserved.
//


#include <iostream>
#include <string>

using namespace std;

int main(int argc, const char * argv[])
{
    int al[26] = {0};
    string sentence;
    getline(cin, sentence);
    transform(sentence.begin(), sentence.end(), sentence.begin(), ::tolower);
    for(int i=0; i<sentence.size(); i++){
        if(sentence[i] == ' '){
            continue;
        }
        al[sentence[i]-'a']++;
    }
   
    for(int i=0; i<='z'-'a'; i++){
        char word = 'a' + i;
        cout << word <<" : "<< al[i] <<endl;
    }
    return 0;
}





Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:20:5: error: 'transform' was not declared in this scope
   20 |     transform(sentence.begin(), sentence.end(), sentence.begin(), ::tolower);
      |     ^~~~~~~~~