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

double s;d;main(n){for(;~scanf("%d",&d);n--)s-=d;exit(!printf("%d\n",d=s/n-1));

Compiler output:
main.c:1:10: warning: data definition has no type or storage class
    1 | double s;d;main(n){for(;~scanf("%d",&d);n--)s-=d;exit(!printf("%d\n",d=s/n-1));
      |          ^
main.c:1:10: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:1:12: error: return type defaults to 'int' [-Wimplicit-int]
    1 | double s;d;main(n){for(;~scanf("%d",&d);n--)s-=d;exit(!printf("%d\n",d=s/n-1));
      |            ^~~~
main.c: In function 'main':
main.c:1:12: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:26: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | double s;d;main(n){for(;~scanf("%d",&d);n--)s-=d;exit(!printf("%d\n",d=s/n-1));
      |                          ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | double s;d;main(n){for(;~scanf("%d",&d);n--)s-=d;exit(!printf("%d\n",d=s/n-1));
main.c:1:26: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | double s;d;main(n){for(;~scanf("%d",&d);n--)s-=d;exit(!printf("%d\n",d=s/n-1));
      |                          ^~~~~
main.c:1:26: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:50: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    1 | double s;d;main(n){for(;~scanf("%d",&d);n--)s-=d;exit(!printf("%d\n",d=s/n-1));
      |                                                  ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | double s;d;main(n){for(;~scanf("%d",&d);n--)s-=d;exit(!printf("%d\n",d=s/n-1));
main.c:1:50: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    1 | double s;d;main(n){for(;~scanf("%d",&d);n--)s-=d;exit(!printf("%d\n",d=s/n-1));
      |                                                  ^~~~
main.c:1:50: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:1:56: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | double s;d;main(n){for(;~scanf("%d",&d);n--)s-=d;exit(!printf("%d\n",d=s/n-1));
      |                                                        ^~~~~~
main.c:1:56: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:56: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:56: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:1: error: expected declaration or statement at end of input
    1 | double s;d;main(n){for(;~scanf("%d",&d);n--)s-=d;exit(!printf("%d\n",d=s/n-1));
      | ^~~~~~
Language: C

#include <stdio.h>

int main(void) {
	int num;
	int nownum;
	int i;
	int sum;
	scanf("%d",&num);
	sum=0;
	for(i=0;i<num;i++) {
		scanf("%d",&nownum);
		sum+=nownum:
	}
	printf("%d\n",sum/num);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:28: error: expected ';' before ':' token
   12 |                 sum+=nownum:
      |                            ^
      |                            ;
Language: C

int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);std::printf("%d\n",s/n);}

Compiler output:
main.c: In function 'main':
main.c:1:36: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);std::printf("%d\n",s/n);}
      |                                    ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);std::printf("%d\n",s/n);}
main.c:1:36: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);std::printf("%d\n",s/n);}
      |                                    ^~~~~
main.c:1:36: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:87: error: 'std' undeclared (first use in this function)
    1 | int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);std::printf("%d\n",s/n);}
      |                                                                                       ^~~
main.c:1:87: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:90: error: expected ';' before '::' token
    1 | int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);std::printf("%d\n",s/n);}
      |                                                                                          ^~
      |                                                                                          ;
Language: C

#include <cstdio>
int main()
{
        long long cus;
        long long  spe[1000000];
        long long cnt;
        scanf("%lld",&cus);

        int sum=0;

        for(cnt=0;cnt<cus;cnt++)
        {
                scanf("%lld",&spe[cnt]);
                sum=sum+spe[cnt];
        }
        long long ans;
        ans=sum/cus;
        printf("%lld\n",ans);

        return 0;
}

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

/*
	0134:Exit Survery
*/
#include	<iostream>

using namespace std;

int main(void) {
	int w;
	__int64 ave, sum = 0;
	
	cin >> w;
	for(int i = 0; i < w; i++) {
		int bu;
		
		cin >> bu;
		sum += bu;
	}
	ave = sum / w;
	cout << ave << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
   10 |         __int64 ave, sum = 0;
      |         ^~~~~~~
      |         __int64_t
a.cc:17:17: error: 'sum' was not declared in this scope
   17 |                 sum += bu;
      |                 ^~~
a.cc:19:9: error: 'ave' was not declared in this scope
   19 |         ave = sum / w;
      |         ^~~
a.cc:19:15: error: 'sum' was not declared in this scope
   19 |         ave = sum / w;
      |               ^~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    int n
    long long sum=0;
    cin>>n;
    for(int i=0;i<n;i++){
        long long int a;
        cin>>a;
        sum+=a;
    }
    cout<<sum/n<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected initializer before 'long'
    7 |     long long sum=0;
      |     ^~~~
a.cc:8:10: error: 'n' was not declared in this scope
    8 |     cin>>n;
      |          ^
a.cc:12:9: error: 'sum' was not declared in this scope
   12 |         sum+=a;
      |         ^~~
a.cc:14:11: error: 'sum' was not declared in this scope
   14 |     cout<<sum/n<<endl;
      |           ^~~
Language: C++

#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <map>
#include <vector>

int main(){
int n;
cin>>n;
int sum=0;
for(int i=0;i<n;i++){
int u=0;
cin>>u;
sum+=u;
}
cout<<sum/n<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 | cin>>n;
      | ^~~
      | std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 | cout<<sum/n<<endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 | cout<<sum/n<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
main(){
	long long n,m,a=0,i=0;
	for(cin>>n;i<n;i++)cin>>m,a+=m;
	cout<<a/<<endl;
}

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:6:17: error: expected primary-expression before '<<' token
    6 |         cout<<a/<<endl;
      |                 ^~
Language: C++

#include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

int n,m;
__int64 s;

int main(){
	cin>>n;
	for(int i=0;i<n;i++){cin>>m;s+=m;}
	cout<<s/n<<endl;
}

Compiler output:
a.cc:17:1: error: '__int64' does not name a type; did you mean '__int64_t'?
   17 | __int64 s;
      | ^~~~~~~
      | __int64_t
a.cc: In function 'int main()':
a.cc:21:37: error: 's' was not declared in this scope
   21 |         for(int i=0;i<n;i++){cin>>m;s+=m;}
      |                                     ^
a.cc:22:15: error: 's' was not declared in this scope
   22 |         cout<<s/n<<endl;
      |               ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

int n,m;
__int64 s=0;

int main(){
	cin>>n;
	for(int i=0;i<n;i++){cin>>m;s+=m;}
	cout<<s/n<<endl;
}

Compiler output:
a.cc:17:1: error: '__int64' does not name a type; did you mean '__int64_t'?
   17 | __int64 s=0;
      | ^~~~~~~
      | __int64_t
a.cc: In function 'int main()':
a.cc:21:37: error: 's' was not declared in this scope
   21 |         for(int i=0;i<n;i++){cin>>m;s+=m;}
      |                                     ^
a.cc:22:15: error: 's' was not declared in this scope
   22 |         cout<<s/n<<endl;
      |               ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

//typedef long long ll;
typedef __int64 ll;
int n,w[10000];

int main(){
	while(cin>>n){
		if(!n)return 0;
		for(int i=0;i<n;i++)cin>>w[i];
		sort(w,w+n);
		ll ans=0;
		for(int i=0;i<n;i++)ans+=w[i]*(n-1-i);
		printf("%I64d\n",ans);/*
		printf("%d\n",ans);
		__int64 a=1;
		printf("%d\n",a);
		__int64 b=100;
		printf("%d\n",b);
		char c[]="text";
		printf("%-.2s\n",c);
		printf("%.2s\n",c);
		printf("%-s\n",c);
		printf("%s\n",c);*/
	}
}

Compiler output:
a.cc:17:9: error: '__int64' does not name a type; did you mean '__int64_t'?
   17 | typedef __int64 ll;
      |         ^~~~~~~
      |         __int64_t
a.cc: In function 'int main()':
a.cc:25:17: error: 'll' was not declared in this scope
   25 |                 ll ans=0;
      |                 ^~
a.cc:26:37: error: 'ans' was not declared in this scope; did you mean 'abs'?
   26 |                 for(int i=0;i<n;i++)ans+=w[i]*(n-1-i);
      |                                     ^~~
      |                                     abs
a.cc:27:34: error: 'ans' was not declared in this scope; did you mean 'abs'?
   27 |                 printf("%I64d\n",ans);/*
      |                                  ^~~
      |                                  abs
Language: C++

using namespace std;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return 0;}

Compiler output:
a.cc:1:37: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | using namespace std;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return 0;}
      |                                     ^~~~
a.cc: In function 'int main()':
a.cc:1:48: error: 'cin' was not declared in this scope
    1 | using namespace std;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return 0;}
      |                                                ^~~
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;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return 0;}
a.cc:1:68: error: 'cout' was not declared in this scope
    1 | using namespace std;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return 0;}
      |                                                                    ^~~~
a.cc:1:68: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:1:79: error: 'endl' was not declared in this scope
    1 | using namespace std;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return 0;}
      |                                                                               ^~~~
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;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return 0;}
Language: C++

#include<iostream>
using namespace std;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return;}

Compiler output:
a.cc:2:37: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | using namespace std;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return;}
      |                                     ^~~~
a.cc: In function 'int main()':
a.cc:2:84: error: return-statement with no value, in function returning 'int' [-fpermissive]
    2 | using namespace std;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return;}
      |                                                                                    ^~~~~~
Language: C++

import java.util.*;

public class Main {
    public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int N = s.nextInt();
	long sum = 0;
	for(int i = 0; i < N; ++i) {
	    sum += (long)s.nextInt();
	}
	System.out.println(sum/N);
    }
}

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:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#import<iostream>
int main(){long long int i,a,n,s=0;cin>>n;for(i=n;i--;s+=a)cin>>a;cout<<s/n<<endl;}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
a.cc: In function 'int main()':
a.cc:2:36: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | int main(){long long int i,a,n,s=0;cin>>n;for(i=n;i--;s+=a)cin>>a;cout<<s/n<<endl;}
      |                                    ^~~
      |                                    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
      |                  ^~~
a.cc:2:67: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    2 | int main(){long long int i,a,n,s=0;cin>>n;for(i=n;i--;s+=a)cin>>a;cout<<s/n<<endl;}
      |                                                                   ^~~~
      |                                                                   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:2:78: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    2 | int main(){long long int i,a,n,s=0;cin>>n;for(i=n;i--;s+=a)cin>>a;cout<<s/n<<endl;}
      |                                                                              ^~~~
      |                                                                              std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#import<iostream>
int main(){long long int i,a,n,s=0;std::cin>>n;for(i=n;i--;s+=a)cin>>a;std::cout<<s/n<<"\n";}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
a.cc: In function 'int main()':
a.cc:2:65: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | int main(){long long int i,a,n,s=0;std::cin>>n;for(i=n;i--;s+=a)cin>>a;std::cout<<s/n<<"\n";}
      |                                                                 ^~~
      |                                                                 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++

int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);printf("%d\n",s/n);}

Compiler output:
a.cc: In function 'int main()':
a.cc:1:36: error: 'scanf' was not declared in this scope
    1 | int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);printf("%d\n",s/n);}
      |                                    ^~~~~
a.cc:1:87: error: 'printf' was not declared in this scope
    1 | int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);printf("%d\n",s/n);}
      |                                                                                       ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);printf("%d\n",s/n);}
Language: C++

int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);printf("%lld\n",s/n);}

Compiler output:
a.cc: In function 'int main()':
a.cc:1:36: error: 'scanf' was not declared in this scope
    1 | int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);printf("%lld\n",s/n);}
      |                                    ^~~~~
a.cc:1:87: error: 'printf' was not declared in this scope
    1 | int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);printf("%lld\n",s/n);}
      |                                                                                       ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);printf("%lld\n",s/n);}
Language: C++

#include<iostream>
using namespace std;
int main(){
int n;
int a,sum;
cin>>n;
for(int i=1;i<=n;i==){
cin>>a;
sum=+a;
}
cout<<sum/n;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: expected primary-expression before ')' token
    7 | for(int i=1;i<=n;i==){
      |                     ^
Language: C++

sum = 0;
gets.to_i.times do 
  sum += gets.to_i
end

puts sum

Compiler output:
a.cc:1:1: error: 'sum' does not name a type
    1 | sum = 0;
      | ^~~
a.cc:2:1: error: 'gets' does not name a type
    2 | gets.to_i.times do
      | ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n;
  cin >> n;
  long long  ave = 0;
  long long  a;
  for(int i = 0 ; i < n ; i++ ){
    cin >> a;
    ave += a;
   }
  cout << (int)(ave/m) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 'm' was not declared in this scope
   12 |   cout << (int)(ave/m) << endl;
      |                     ^
Language: Java

import java.util.Scanner;

public class mm {
	
	
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		String ans[]=new String[n];
		for(int i=0;i<n;i++){
		String s=sc.next();
		String ss[]=s.split(":");
		int h=Integer.parseInt(ss[0]);
	    int m=Integer.parseInt(ss[1]);
	    int k=Math.abs(60*h+m-12*m);
	    
	    if(k<60 || k>660 ){ans[i]="alert";}
	    else if(k>=180 && k<=540){ans[i]="safe";}
	    else {ans[i]="warning";}     
		
		}
		for(int i=0;i<n;i++){
			System.out.println(ans[i]);
		}
		}
		}

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

import java.util.*;
public class Main {
	static Scanner sc = new Scanner(System.in);
	static int n;
	public static void main(String[] args) {
		read();
	}
	static boolean read(){
		if(!sc.hasNext())return false;
		n = sc.nextInt();
		for(int i = 0; i < n; i++){
			String[] line = new String[2];
			line = sc.next().split(":");
			solve(line);
		}
		return true;
	}
	static void solve(String[] param){
		int hour = Integer.parseInt(param[0]);
		int time = Integer.parseInt(param[1]);
		double longHand = 6*time;
		double shortHand = 30*hour + 0.5*time;
		double diff = Math.abs(longHand - shortHand);
		if(diff > 180.0)diff = diff - 180.0;
		if(diff >= 0.0 && diff <= 30.0){
			System.out.println("alert");
		}else if(diff >= 90.0 && diff <= 180.0){
			System.out.println("safe");
		}else{
			System.out.println("warning");
		}
	}

Compiler output:
Main.java:32: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int n = Integer.parseInt(sc.nextLine());
		
		for(int i = 0; i < n; i++){
			String[] strs = sc.nextLine().split(":");
			int hour = Integer.parseInt(strs[0]);
			int min = Integer.parseInt(strs[1]);
			
			double m_rad = (min / 60.0) * 360;
			double h_rad = (hour / 12.0) * 360 + (min / 60.0) * 30;
			
			double diff = Math.min(Math.abs(h_rad - m_rad) , Math.abs(m_rad - h_rad));
			if(diff >= 180){
				diff = 360 - diff;
			}
			
			if(0 <= diff && diff < 30){
				System.out.println("alert");
			}else if(90 <= diff && diff < 180){
				System.out.println("safe");
			}else{
				System.out.println("warning");
			}
			
		}
	}
	

Compiler output:
Main.java:32: error: reached end of file while parsing
	}
	 ^
1 error
Language: C

#include<stdio.h>
int main(void)
{
	int i,n,x,y,temp;
	scanf("%d",&n);
	for(i=1;i<=n;i++) {
		scanf("%d:%d",&x,&y);
		x=x*5;
		if(x<y) {
			temp=x;
			x=y;
			y=temp;
		}
		if(0<=(x-y) && (x-y)<5) {
			printf("alert\n");
		}
		else if(
		else if(15<=(x-y) && (x-y)<=30) {
			printf("safe\n");
		}
		else {
			printf("warning\n");
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:17: error: expected expression before 'else'
   18 |                 else if(15<=(x-y) && (x-y)<=30) {
      |                 ^~~~
main.c:24:9: error: expected expression before '}' token
   24 |         }
      |         ^
Language: C

#include <stdio.h>
#include <math.h>
int main() {
	int N, I;
	double h, m, a;
	scanf("%d", &N);
	for(I = 0; I < N; ++ I) {
		scanf("%lf:%lf", &h, &m);
		h = 30 * h + m / 2;
		m = 6 * m;
		a = fabs((a < 0)? (a - 180) % 360 + 180: (a + 180) % 360 - 180);
		if(a < 30) printf("alert\n");
		else if(a < 90) printf("warning\n");
		else printf("safe\n");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:45: error: invalid operands to binary % (have 'double' and 'int')
   11 |                 a = fabs((a < 0)? (a - 180) % 360 + 180: (a + 180) % 360 - 180);
      |                                   ~~~~~~~~~ ^
      |                                      |
      |                                      double
main.c:11:68: error: invalid operands to binary % (have 'double' and 'int')
   11 |                 a = fabs((a < 0)? (a - 180) % 360 + 180: (a + 180) % 360 - 180);
      |                                                          ~~~~~~~~~ ^
      |                                                             |
      |                                                             double
Language: C

#inclde <stdio.h>

int main(void) {
	int datamax;
	int datanum;
	int hour,min;
	int kakudo;
	scanf("%d",&datamax);
	for(datanum=0;datanum<datamax;datanum++) {
		scanf("%d:%d",&hour,&min);
		kakudo=hour*360/12*2;
		kakudo+=min;
		kakudo-=min*360/60*2;
		if(kakudo<0)kakudo=-kakudo;
		if(kakudo<30*2)puts("alert");
		else if(kakudo>=90*2)puts("safe");
		else puts("warning");
	}
	return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inclde; did you mean #include?
    1 | #inclde <stdio.h>
      |  ^~~~~~
      |  include
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |         scanf("%d",&datamax);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inclde <stdio.h>
main.c:8:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |         scanf("%d",&datamax);
      |         ^~~~~
main.c:8:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:15:32: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
   15 |                 if(kakudo<30*2)puts("alert");
      |                                ^~~~
main.c:15:32: note: include '<stdio.h>' or provide a declaration of 'puts'
Language: C

#include <stdio.h>
#include <math.h>

#define gosa 1e-9;

int main () {
	int n , i , h , m;
	scanf("%d",&n);
	for ( i = 0; i < n; i++ ) {
		double tan = 0.0 , chou =0.0 , is;
		scanf("%d:%d",&h,&m);
		tan = ( 30 *  h ) + (double)( m / 12 );
		chou = 6 * m;
		is = fabs(tan-chou);
		if ( is+gosa < 30.00 )
			printf("alert\n");
		else if ( 90 <= is+gosa && is+gosa <= 180.00 )
			printf("safe\n");
		else
			printf("worning\n");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:18: error: expected ')' before ';' token
    4 | #define gosa 1e-9;
      |                  ^
main.c:15:25: note: in expansion of macro 'gosa'
   15 |                 if ( is+gosa < 30.00 )
      |                         ^~~~
main.c:15:20: note: to match this '('
   15 |                 if ( is+gosa < 30.00 )
      |                    ^
main.c:4:18: error: expected ')' before ';' token
    4 | #define gosa 1e-9;
      |                  ^
main.c:17:36: note: in expansion of macro 'gosa'
   17 |                 else if ( 90 <= is+gosa && is+gosa <= 180.00 )
      |                                    ^~~~
main.c:17:25: note: to match this '('
   17 |                 else if ( 90 <= is+gosa && is+gosa <= 180.00 )
      |                         ^
Language: C

#include <stdio.h>
#include <math.h>

int main(void)
{
	double angle[12] = {0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330};
	double h, m, ang;
	int n;
	
	scanf("%d", &n);
	
	while (n-- != 0){
		scanf("%lf%*c%lf", &h, &m);
		
		h = angle[h] + m / 2;
		m *= 6;
		
		ang = fabs(h - m) >= 180 ? fabs(360.0 - fabs(h - m)) :fabs(h - m) ;
		
		if (0 <= ang && ang < 30){
			printf("alert\n");
		}
		else if (90 <= ang && ang <= 180){
			printf("safe\n");
		}
		else {
			printf("warning\n");
		}
		
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:15:26: error: array subscript is not an integer
   15 |                 h = angle[h] + m / 2;
      |                          ^
Language: C

main(n,h,m,d){
	scanf("%d",&n);
	for(;n--;){
		scanf("%d:%d",&h,&m);
		double s=h*30+m/2,l=m*6,t,d;
		if(l<s)
			t=s,s=l,l=t;
		d=l-s;
		d=(s-l+360<d)?s-l+360:d;
		(d<30)?
			puts("alert")
		:
			(d<90)?
				puts("warning");
			:
				puts("safe");
	}
}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(n,h,m,d){
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'h' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'm' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'd' defaults to 'int' [-Wimplicit-int]
main.c:2:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    2 |         scanf("%d",&n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(n,h,m,d){
main.c:2:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    2 |         scanf("%d",&n);
      |         ^~~~~
main.c:2:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:11:25: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
   11 |                         puts("alert")
      |                         ^~~~
main.c:11:25: note: include '<stdio.h>' or provide a declaration of 'puts'
main.c:14:48: error: expected ':' before ';' token
   14 |                                 puts("warning");
      |                                                ^
      |                                                :
main.c:15:25: error: expected expression before ':' token
   15 |                         :
      |                         ^
Language: C++

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

int main(void){
	int n;
	
	cin>> n ;
	for(int i = 0 ; i < n ; i++){
		int a,b; char c;
		
		cin>>a>>c>>b;
//		cout<<a<<" "<<b<<endl;
		double A =(double)a*30+b*0.5;
		double B =(double)b*6;
		
		double judge = abs(A-B)%180;
//		if(180<judge)judge = 360.0 - judge;
//		cout<<judge<<endl;
	
//		cout<<a<<" "<<b<<" "<<judge<<endl;
		if(0<=judge && judge<30)cout<<"alert"<<endl;
		else if(90<=judge && judge<=180)cout<<"safe"<<endl;
		else cout<<"warning"<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:40: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   17 |                 double judge = abs(A-B)%180;
      |                                ~~~~~~~~^~~~
      |                                   |     |
      |                                   |     int
      |                                   double
Language: C++

main(n){double a,b;char m[3][8]={"alert","warning","safe"};for(scanf("%d",&n);n--;scanf("%lf:%lf",&a,&b),a=a+b/60-b/5,a=a>6?12-a:a,printf("%s\n",m[(a>=1)+(a>=3)]));}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(n){double a,b;char m[3][8]={"alert","warning","safe"};for(scanf("%d",&n);n--;scanf("%lf:%lf",&a,&b),a=a+b/60-b/5,a=a>6?12-a:a,printf("%s\n",m[(a>=1)+(a>=3)]));}
      |     ^
Language: C++

// AOJ 0135 (http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0135)
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#define rep(i,a) for(int i=0;i<(a);++i)

int h;

int main()
{
	scanf( "%d", &h );
	rep( i, h )
	{
		int hh, mm;
		scanf( "%d:%d", &hh, &mm );

		double diff = fabs(hh*30+mm/2.0-mm*6);
		diff = std::min( diff, 360-diff );

		puts( diff<30?"alert":diff<90?"warning":"safe" );
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:31: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   17 |                 double diff = fabs(hh*30+mm/2.0-mm*6);
      |                               ^~~~
      |                               labs
Language: C++

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

string func(int s, int l){
	int a = l * 6;
	int b = s * 30 + l / 2;
	int s = abs(a - b);
	if(s > 180)s = 360 - s;
	if(30 <= s){
		if(90 <= s)return "safe";
		return "warning";
	}else return "alert";
	cout << a  << " " << b;
	return "a";
}

int main(){
	int n, s, l;cin >> n;
	char c;
	while(n--){
		cin >> s >> c >> l;
		cout << func(s, l) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'std::string func(int, int)':
a.cc:9:13: error: declaration of 'int s' shadows a parameter
    9 |         int s = abs(a - b);
      |             ^
a.cc:6:17: note: 'int s' previously declared here
    6 | string func(int s, int l){
      |             ~~~~^
Language: C++

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

string func(int M, int H){
	/*double a = l * 6;
	double b = s * 30.0 + l / 2.0;
	int m = abs(a - b);
	if(180 < m)m = 360 - m;
	if(0 <= m && m < 30)return "alert";
	if(90 <= m && m <= 180)return "safe";
	return "waring";
	if(m > 180)m = 360 - m;
	if(30 <= m){
		if(90 <= m)return "safe";
		return "warning";
	}
	return "alert";*/
	double h = H*30.0 + M/2.0, m = M*6;
     
    int ang = abs(h - m);
    if(ang > 180) ang = 360 - ang;
    if(0 <= ang && ang < 30) {
      return "alert";
    }
    else if(90 <= ang && ang <= 180) {
      return "safe";
    }
    return "warning";
  }
}

int main(){
	int n, s, l;cin >> n;
	char c;
	while(n--){
		cin >> s >> c >> l;
		cout << func(s, l) << endl;
	}
	return 0;
}

Compiler output:
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^
Language: C++

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

string func(int s, int l){
	double h = s*30.0 + l/2.0, m = l*6;
     
    int ang = abs(h - m);
    if(ang > 180) ang = 360 - ang;
    if(0 <= ang && ang < 30) {
      return "alert";
    }
    else if(90 <= ang && ang <= 180) {
      return "safe";
    }
    else return "warning";
}
 
int main() {
	int n, s, l; cin >> n;
	while(n--) {
		cin >> s >> c >> l;
		cout << func(s, l) << endl;
	}
  	return 0;
}

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

#include <cstdio>
#define abs(x) ((x) < 0 ? -(x) : (x))
#define rep(i, n) for(int i = 0; i < (n); ++i)
int main()
{
	int n; scanf("%d", &n);
	rep(i, n) {
		int h, m; scanf("%d:%d", &h, &m);
		int ah = h * 60 + m; if (ah >= 360) ah -= 360;
		int am = 12 * m; if (am >= 360) am -= 360;
		int diff = abs(ah - am)
		if (0 <= diff && diff < 60) puts("alert");
		else if (180 <= diff && diff <= 360) puts("safe");
		else puts("warning");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ',' or ';' before 'if'
   12 |                 if (0 <= diff && diff < 60) puts("alert");
      |                 ^~
a.cc:13:17: error: 'else' without a previous 'if'
   13 |                 else if (180 <= diff && diff <= 360) puts("safe");
      |                 ^~~~
Language: C++

#include <cstdio>
int main(){
	int n,h,m;
	scanf("%d",&n);
	for(;n--;){
		scanf("%d:%d",&h,&m);
		double s=h*30+m/2.,l=m*6,t,d;
		l<s?t=l,l=s,s=t:0;
		d=s-l+360;
		l-s<d?d=l-s:0;
		d<30?
			puts("alert");
		:
			d<90?
				puts("warning")
			:
				puts("safe");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:38: error: expected ':' before ';' token
   12 |                         puts("alert");
      |                                      ^
      |                                      :
a.cc:12:38: error: expected primary-expression before ';' token
a.cc:13:17: error: expected primary-expression before ':' token
   13 |                 :
      |                 ^
Language: C++


#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;

int main(){
  int n;
  cin >> n;
  while(n--){
    int h, m;
    scanf("%d:%d", &h, &m);
    double H = (double)h * 30 + m*0.5;
    double M = (double)m * 6;
    
    double ans = abs(H-M);
    
    if(0 <= ans && ans < 30) cout << "alert" << endl;
    else if(90 <= ans && ans <= 180) cout << "safe" << endl;
    else cout << "warning" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> n;
      |   ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include <cmath>
  +++ |+#include <iostream>
    5 | using namespace std;
a.cc:18:30: error: 'cout' was not declared in this scope
   18 |     if(0 <= ans && ans < 30) cout << "alert" << endl;
      |                              ^~~~
a.cc:18:30: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:49: error: 'endl' was not declared in this scope
   18 |     if(0 <= ans && ans < 30) cout << "alert" << endl;
      |                                                 ^~~~
a.cc:5:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    4 | #include <cmath>
  +++ |+#include <ostream>
    5 | using namespace std;
a.cc:19:38: error: 'cout' was not declared in this scope
   19 |     else if(90 <= ans && ans <= 180) cout << "safe" << endl;
      |                                      ^~~~
a.cc:19:38: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:56: error: 'endl' was not declared in this scope
   19 |     else if(90 <= ans && ans <= 180) cout << "safe" << endl;
      |                                                        ^~~~
a.cc:19:56: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:20:10: error: 'cout' was not declared in this scope
   20 |     else cout << "warning" << endl;
      |          ^~~~
a.cc:20:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:31: error: 'endl' was not declared in this scope
   20 |     else cout << "warning" << endl;
      |                               ^~~~
a.cc:20:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

using namespace std;

int main() {
	int n;
	int hour,minute;
	char d;
	double kakuh,kakum,sa;
	cin >> n;

	for (int i = 0; i < n; i++) {
		cin >> hour >> d >> minute;
		kakuh = 30.0 * hour + minute * 0.5;
		kakum = 6.0 * minute;
		sa = fabs(kakuh-kakum);
		if (sa > 180.0) {
			sa = sa - 180;
		}
		if (sa <30.0) {
			cout << "alert" << endl;
		} else if (sa >= 90.0) {
			cout << "safe" << endl;
		} else {
			cout << "warning" << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:22: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   18 |                 sa = fabs(kakuh-kakum);
      |                      ^~~~
      |                      labs
Language: C++

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

int main() {
	int a,b,n;
	char c;
	cin >> n;
	for (;n>0;n--) {
	scanf("%d%c%d",&a,&c,&b);
	a*=30; b*=6;
	b=(b-a+360) % 360;
	b= b >180 ? 360-b : b;
	if (b=<30) cout << "alert" << endl; else
		if (b>=90) cout << "safe" << endl; else cout << "warning" << endl;
	}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: expected primary-expression before '<' token
   14 |         if (b=<30) cout << "alert" << endl; else
      |               ^
Language: C++

#include "stdafx.h"
#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
	int n;
	double a,b,d;
	char c;
	cin >> n;
	for (;n>0;n--) {
	scanf("%lf%c%lf",&a,&c,&b);
	a= a>=12 ? a-12 : a;
	a=a*30+b*0.5; b*=6;
	if (a>b) { d=a; a=b; b=d;}
	b-=a;
	b= b>180 ? 360-b : b;
	if (b<30) cout << "alert" << endl; else
		if (b>=90) cout << "safe" << endl; else cout << "warning" << endl;
	}
return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

freq=Array.new(6, 0)

gets.to_i.times {
  h=gets.to_f
  case
    when h<165
      freq[0]+=1
    when h<170
      freq[1]+=1
    when h<175
      freq[2]+=1
    when h<180
      freq[3]+=1
    when h<185
      freq[4]+=1
    else
      freq[5]+=1
  end
}

freq.each_index { |i|
  puts "#{i+1}:" << '*' * freq[i]
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
freq=Array.new(6, 0)
^
1 error
Language: Java

import java.util.*;
public class Main0136{
    public static void main(String[] args){
	new Main0136().run();
    }
    Scanner sc = new Scanner(System.in);

    int n;
    int[] h;

    void run(){
	while(sc.hasNext()){
	    n = sc.nextInt();
	    h = new int[6];
	    for(int i=0; i<n; i++){
		double x = sc.nextDouble();
		apart(h, x);
	    }
	    
	    for(int i=0; i<h.length; i++){
		System.out.print((i+1)+":");
		for(int k=0; k<h[i]; k++)
		    System.out.print("*");
		System.out.println();
	    }
	}
    }

    void apart(int[] h, double x){
	if(x<165.0) h[0]++;
	else if(x<170.0) h[1]++;
	else if(x<175.0) h[2]++;
	else if(x<180.0) h[3]++;
	else if(x<185.0) h[4]++;
	else h[5]++;
    }
}

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

#include <stdio.h>
int main(void)
{
	int n;
	double siz;
	int i, j;
	int grade[6] = {0};
	
	scanf("%d", &n);
	
	for (i = 0; i < n; i++){
		scanf("%lf", &siz);
		if(siz >= 185.0){
			grade[5]++;
		}
		else if(siz >= 180.0){
			grade[4]++;
		}
		else if(siz >= 175.0){
			grade[3]++;
		}
		else if(siz >= 170.0){
			grade[2]++;
		}
		else if(siz >= 165.0){
			grade[1]++;
		}
		else {
			grade[0]++;
		}
	}
	
	for (i = 0; i < 6; i++){
		printf("%d:", i+1);
		
		for(j = 1; j <= grade[i]; j++){
			printf("*");
		}
		print("\n");
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:39:17: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   39 |                 print("\n");
      |                 ^~~~~
      |                 printf
Language: C

#include<stdio.h>
int main(){
int n,i,j,k,b[6]={0,0,0,0,0,0};
double a[40];
scanf("%d",&n);
for(i=0;iN;i++){
scanf("%lf",&a[i]);
if(a[i]<165.0)
b[0]++;
else if(a[i]<170.0)
b[1]++;
else if(a[i]<175.0)
b[2]++;
else if(a[i]<180.0)
b[3]++;
else if([i]<185.0)
b[4]++;
else b[5]++;
}
for(j=0;j<6;j++){
printf("%d:",j+1);
for(k=0;k<b[j];k++)
printf("*");
printf("/n");
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'iN' undeclared (first use in this function); did you mean 'i'?
    6 | for(i=0;iN;i++){
      |         ^~
      |         i
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:9: error: expected expression before '[' token
   16 | else if([i]<185.0)
      |         ^
Language: C

#include<stdio.h>
int main(){
int n,i,j,k,b[6]={0,0,0,0,0,0};
double a[40];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lf",&a[i]);
if(a[i]<165.0)
b[0]++;
else if(a[i]<170.0)
b[1]++;
else if(a[i]<175.0)
b[2]++;
else if(a[i]<180.0)
b[3]++;
else if([i]<185.0)
b[4]++;
else b[5]++;
}
for(j=0;j<6;j++){
printf("%d:",j+1);
for(k=0;k<b[j];k++)
printf("*");
printf("/n");
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:9: error: expected expression before '[' token
   16 | else if([i]<185.0)
      |         ^
Language: C

#include<stdio.h>
int main(){
int n,i,a[6],j;
double x;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lf",&x);
if(x<165)
a[0]++;
else if(165<=x&&170>x)
a[1]++;
else if(170<=x&&175>x)
a[2]++;
else if(175<=x&&180>x)
a[3]++;
else if(180<=x&&185>x)
a[4]++;
else a[5]++;
}
for(i=0;i<6;i++){
printf("%d:"i+1);
for(j=0;j<a[i];j++)
printf("*");
printf("\n");
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:13: error: expected ')' before 'i'
   21 | printf("%d:"i+1);
      |       ~     ^
      |             )
main.c:26:1: error: expected declaration or statement at end of input
   26 | }
      | ^
Language: C

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

int main(void)
{
    int n;
    int freq[6];
    double height;
    int i, j;
    
    memset(freq, 0, sizeof(freq));
    
    scanf("%d", &n);
    
    for (i = 0; i < n; i++){
        scanf("%lf", &height);
        if (height < 165.0){
            freq[0]++;
        }
        else if (height >= 185.0){
            freq[5]++;
        }
        else {
            freq[((height - 165.0) / 5.0) + 1]++;
        }
    }

    for (i = 0; i < 6; i++){
        printf("%d:", i + 1);
        for (j = 0; j < freq[i]; j++){
            printf("*");
        }
        printf("\n");
    }
    
    return (0);
}

Compiler output:
main.c: In function 'main':
main.c:24:17: error: array subscript is not an integer
   24 |             freq[((height - 165.0) / 5.0) + 1]++;
      |                 ^
Language: C++

#include <iostream>

using namespace std;

int main(){

	int i, n;
	double high;
	int num[6];

	 memset(num, 0, sizeof(num));

	cin >> n;

	for(i = 0; i < n; i++){
		cin >> high;

		if(high < 165.0){
			num[0]++;
		}

		else if(high >= 165.0 && high < 170.0){
			num[1]++;
		}

		else if(high >= 170.0 && high < 175.0){
			num[2]++;
		}

		else if(high >= 175.0 && high < 180.0){
			num[3]++;
		}

		else if(high >= 180.0 && high < 185.0){
			num[4]++;
		}

		else{
			num[5]++;
		}
	}

	cout << "1:";
		for(i = 0; i < num[0]; i++){
			cout << "*";
		}
		cout << endl;

		cout << "2:";
		for(i = 0; i < num[1]; i++){
			cout << "*";
		}
		cout << endl;

		cout << "3:";
		for(i = 0; i < num[2]; i++){
			cout << "*";
		}
		cout << endl;

		cout << "4:";
		for(i = 0; i < num[3]; i++){
			cout << "*";
		}

		cout << "5";
		for(i = 0; i < num[4]; i++){
			cout << "*";
		}
		cout << endl;

		cout << "6:";
		for(i = 0; i < num[5]; i++){
			cout << "*";
		}
		cout << endl;

		
		return 0;
}

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

#include<stdio.h>
int main()
{
double N;
int num[41]={},A,B=0;

scanf("%d",&A);
for(int i=0;i<A;i++)
{
scanf("lf",&N);
B=N*10;
if((int)N<165)num[0]++;
else if((int)N>=1650&&(int)N<1700)num[1]++;
else if((int)N>=1700&&(int)N<1750)num[2]++;
else if((int)N>=1750&&(int)N<1800)num[3]++;
else if((int)N>=1800&&(int)N<1850)num[4]++;
else if((int)N>=1850)num[5]++;
else if((int)N>=1650&&(int)N<165)num[6]++;
}
for(int i=0;i<6;i++)
{printf("%d:);
for(int j=0;j<num[i];j++)
printf("*");
}
printf("\n");

return 0;
}

Compiler output:
a.cc:21:9: warning: missing terminating " character
   21 | {printf("%d:);
      |         ^
a.cc:21:9: error: missing terminating " character
   21 | {printf("%d:);
      |         ^~~~~~
a.cc: In function 'int main()':
a.cc:22:1: error: expected primary-expression before 'for'
   22 | for(int j=0;j<num[i];j++)
      | ^~~
a.cc:22:13: error: 'j' was not declared in this scope
   22 | for(int j=0;j<num[i];j++)
      |             ^