Download examples/Broken.java from Angshul/Codefixer: direct link, hf CLI and curl.
- Browser
- Download file 528 Bytes
-
https://huggingface.co/spaces/Angshul/Codefixer/resolve/main/examples/Broken.java
- Command line
-
hf download hf://spaces/Angshul/Codefixer/examples/Broken.java
-
curl -L -o Broken.java https://huggingface.co/spaces/Angshul/Codefixer/resolve/main/examples/Broken.java
528 Bytes
| import java.util.Scanner; | |
| public class Stats { | |
| static double mean(int[] xs) { | |
| int total = 0; | |
| for (int x : xs) total += x | |
| return (double) total / xs.length; | |
| } | |
| public static void main(String[] args) { | |
| Scanner in = new Scanner(System.in); | |
| int n = in.nextInt(); | |
| int[] xs = new int[n]; | |
| for (int i = 0; i < n; i++) xs[i] = in.nextInt(); | |
| System.out.printf("mean = %.2f%n", mena(xs)); | |
| Strin label = "done"; | |
| System.out.println(label); | |
| } | |
| } | |