-1

エラー:

File: F:\lab_2.java  [line: 36]
Error: next cannot be resolved or is not a field
File: F:\lab_2.java  [line: 38]
Error: next cannot be resolved or is not a field
File: F:\lab_2.java  [line: 40]
Error: next cannot be resolved or is not a field
File: F:\lab_2.java  [line: 42]
Error: Duplicate local variable outa 

コード:

   else if (choice==1){
          int a;
          int b;
          int c;
          System.out.println("what is a ?");
          a=myscan.next ;   //line 36
          System.out.println("what is b ?");
          b=myscan.next ;   //line38
          System.out.println("what is c ?");
          c=myscan.next ;   //line40
       double outa =(b + Math.sqrt((b*b)-4*a*c))/(2*a);
       double outa =(b - Math.sqrt((b*b)-4*a*c))/(2*a);   //line42
       }
          //quadratic formula ^^^^
4

1 に答える 1