#ifndef FUNCTION06_H_
#define FUNCTION06_H_
#include <stdio.h>
#include <stdlib.h>
double average(int scores[], int size);
int main() {
int n; scanf("%d", &n);
int *scores = new int[n];
for(int i = 0; i < n; i++) scanf("%d", scores + i);
double ans = average(scores, n);
printf("%.6f\n", ans);
return 0;
}
#endif // FUNCTION06_H_
I2lmbmRlZiBGVU5DVElPTjA2X0hfCiNkZWZpbmUgRlVOQ1RJT04wNl9IXwoKI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmRvdWJsZSBhdmVyYWdlKGludCBzY29yZXNbXSwgaW50IHNpemUpOwoKaW50IG1haW4oKSB7CiAgaW50IG47IHNjYW5mKCIlZCIsICZuKTsKICBpbnQgKnNjb3JlcyA9IG5ldyBpbnRbbl07CiAgZm9yKGludCBpID0gMDsgaSA8IG47IGkrKykgc2NhbmYoIiVkIiwgc2NvcmVzICsgaSk7CiAgZG91YmxlIGFucyA9IGF2ZXJhZ2Uoc2NvcmVzLCBuKTsKICBwcmludGYoIiUuNmZcbiIsIGFucyk7CiAgcmV0dXJuIDA7Cn0KI2VuZGlmIC8vIEZVTkNUSU9OMDZfSF8K
Main.java:1: error: illegal character: '#'
#ifndef FUNCTION06_H_
^
Main.java:2: error: illegal character: '#'
#define FUNCTION06_H_
^
Main.java:4: error: illegal character: '#'
#include <stdio.h>
^
Main.java:5: error: illegal character: '#'
#include <stdlib.h>
^
Main.java:9: error: class, interface, or enum expected
int main() {
^
Main.java:10: error: class, interface, or enum expected
int n; scanf("%d", &n);
^
Main.java:11: error: class, interface, or enum expected
int *scores = new int[n];
^
Main.java:12: error: class, interface, or enum expected
for(int i = 0; i < n; i++) scanf("%d", scores + i);
^
Main.java:12: error: class, interface, or enum expected
for(int i = 0; i < n; i++) scanf("%d", scores + i);
^
Main.java:12: error: class, interface, or enum expected
for(int i = 0; i < n; i++) scanf("%d", scores + i);
^
Main.java:13: error: class, interface, or enum expected
double ans = average(scores, n);
^
Main.java:14: error: class, interface, or enum expected
printf("%.6f\n", ans);
^
Main.java:15: error: class, interface, or enum expected
return 0;
^
Main.java:16: error: class, interface, or enum expected
}
^
Main.java:17: error: illegal character: '#'
#endif // FUNCTION06_H_
^
15 errors