Language: C

int main(){int t[99];int r[99];int sum=0;int i=0;double n=0;while(scanf("%d,%d",&t[i],&r[i])!=EOF){sum=sum+t[i]*r[i];n=n+r[i++];}printf("%d\n%.0f\n",sum,round(n/i));return 0;}

Compiler output:
main.c: In function 'main':
main.c:1:67: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | int main(){int t[99];int r[99];int sum=0;int i=0;double n=0;while(scanf("%d,%d",&t[i],&r[i])!=EOF){sum=sum+t[i]*r[i];n=n+r[i++];}printf("%d\n%.0f\n",sum,round(n/i));return 0;}
      |                                                                   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){int t[99];int r[99];int sum=0;int i=0;double n=0;while(scanf("%d,%d",&t[i],&r[i])!=EOF){sum=sum+t[i]*r[i];n=n+r[i++];}printf("%d\n%.0f\n",sum,round(n/i));return 0;}
main.c:1:67: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | int main(){int t[99];int r[99];int sum=0;int i=0;double n=0;while(scanf("%d,%d",&t[i],&r[i])!=EOF){sum=sum+t[i]*r[i];n=n+r[i++];}printf("%d\n%.0f\n",sum,round(n/i));return 0;}
      |                                                                   ^~~~~
main.c:1:67: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:95: error: 'EOF' undeclared (first use in this function)
    1 | int main(){int t[99];int r[99];int sum=0;int i=0;double n=0;while(scanf("%d,%d",&t[i],&r[i])!=EOF){sum=sum+t[i]*r[i];n=n+r[i++];}printf("%d\n%.0f\n",sum,round(n/i));return 0;}
      |                                                                                               ^~~
main.c:1:95: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:1:95: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:130: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | int main(){int t[99];int r[99];int sum=0;int i=0;double n=0;while(scanf("%d,%d",&t[i],&r[i])!=EOF){sum=sum+t[i]*r[i];n=n+r[i++];}printf("%d\n%.0f\n",sum,round(n/i));return 0;}
      |                                                                                                                                  ^~~~~~
main.c:1:130: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:130: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:130: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:154: error: implicit declaration of function 'round' [-Wimplicit-function-declaration]
    1 | int main(){int t[99];int r[99];int sum=0;int i=0;double n=0;while(scanf("%d,%d",&t[i],&r[i])!=EOF){sum=sum+t[i]*r[i];n=n+r[i++];}printf("%d\n%.0f\n",sum,round(n/i));return 0;}
      |                                                                                                                                                          ^~~~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'round'
  +++ |+#include <math.h>
    1 | int main(){int t[99];int r[99];int sum=0;int i=0;double n=0;while(scanf("%d,%d",&t[i],&r[i])!=EOF){sum=sum+t[i]*r[i];n=n+r[i++];}printf("%d\n%.0f\n",sum,round(n/i));return 0;}
main.c:1:154: warning: incompatible implicit declaration of built-in function 'round' [-Wbuiltin-declaration-mismatch]
    1 | int main(){int t[99];int r[99];int sum=0;int i=0;double n=0;while(scanf("%d,%d",&t[i],&r[i])!=EOF){sum=sum+t[i]*r[i];n=n+r[i++];}printf("%d\n%.0f\n",sum,round(n/i));return 0;}
      |                                                                                                                                                          ^~~~~
main.c:1:154: note: include '<math.h>' or provide a declaration of 'round'