Language: C

include<stdio.h>
a[100],b[100],s,c;int main(){
	int i,j,as=0;
	for(i=0;scanf("%d,%d",&a[i],&b[i])!=EOF;i++){
		s+=a[i]*b[i];as+=b[i];c++;
	}
	printf("%d\n%d\n",s,(int)((double)((double)as/(double)c)+0.5));exit(0);
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:4:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         for(i=0;scanf("%d,%d",&a[i],&b[i])!=EOF;i++){
      |                 ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
main.c:4:17: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         for(i=0;scanf("%d,%d",&a[i],&b[i])!=EOF;i++){
      |                 ^~~~~
main.c:4:17: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:32: error: 'a' undeclared (first use in this function); did you mean 'as'?
    4 |         for(i=0;scanf("%d,%d",&a[i],&b[i])!=EOF;i++){
      |                                ^
      |                                as
main.c:4:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:38: error: 'b' undeclared (first use in this function)
    4 |         for(i=0;scanf("%d,%d",&a[i],&b[i])!=EOF;i++){
      |                                      ^
main.c:4:45: error: 'EOF' undeclared (first use in this function)
    4 |         for(i=0;scanf("%d,%d",&a[i],&b[i])!=EOF;i++){
      |                                             ^~~
main.c:4:45: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:5:17: error: 's' undeclared (first use in this function); did you mean 'as'?
    5 |                 s+=a[i]*b[i];as+=b[i];c++;
      |                 ^
      |                 as
main.c:5:39: error: 'c' undeclared (first use in this function)
    5 |                 s+=a[i]*b[i];as+=b[i];c++;
      |                                       ^
main.c:7:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |         printf("%d\n%d\n",s,(int)((double)((double)as/(double)c)+0.5));exit(0);
      |         ^~~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:72: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    7 |         printf("%d\n%d\n",s,(int)((double)((double)as/(double)c)+0.5));exit(0);
      |                                                                        ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | include<stdio.h>
main.c:7:72: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    7 |         printf("%d\n%d\n",s,(int)((double)((double)as/(double)c)+0.5));exit(0);
      |                                                                        ^~~~
main.c:7:72: note: include '<stdlib.h>' or provide a declaration of 'exit'