0

Why doesn't this work in IntelliJ?

public class main {
    public static void main(int A, int B, int C){
        int sum = 0;
        double avg = 0.0;
        sum = (A+B+C);
        avg = (double)sum/3.0;
        System.out.println("the sum ="+ sum);
        System.out.println("the average = "+ avg);

    }
}
Federico klez Culloca
  • 26,308
  • 17
  • 56
  • 95
botboi
  • 1
  • 1
  • Too much generic; why don't you post at least the error you got – Jack Apr 26 '22 at 12:18
  • 1
    While in this it is clear what the problem is, for the future please add a bit more explanation. "Doesn't work" is not something that helps people understand how they can help you. Next time please be sure to include error messages (if any), expected inputs, expected output, etc. Please read [ask] – Federico klez Culloca Apr 26 '22 at 12:20

0 Answers0