0
was about to finish coding calculator but something happen and that is reached end of file while parsing
8 Respostas
+ 2
I'm sorry but this is an app for people who want to learn programming. If you're looking for mind readers you'll have to look somewhere else.
+ 1
1.Java
public class calculator{
    public void add(int x,int y){
    int sum =x+y;
    System.out.println(sum);
    }
    public void substract(int x, int y){
        int difference = x-y;
        System.out.println(difference);
    }
    public void divide(int x, int y){
        int quotient = x/y;
        System.out.println(quotient);
    }
    public void multiply(int x, int y){
      int product =x*y;
      System.out.println(product);
      }
      public static void main(String[]args){
          Calculator calculator = new Calculator();
          calculator.add(4,2);
          calculator.substract(4,2);
          calculator.divide(4,2);
          calculator.multiply(4,2);
      }
+ 1
What about now
+ 1
Actually, I think I found the problem after all. You're missing one last closing curly brace "}" to close the one you open in the first line.
+ 1
"end of file reached while parsing" means that your computer is looking for something that just doesn't come, usually a closing parenthesis or closing quotation mark.
0
Am not looking mind reader
0
1. You did not specify which programming language you are using.
2. You used a nonsense tag.
3. You haven't shown your code.
(4. You haven't even asked a question.)
So how is anyone supposed to help you unless they can read your mind?
0
Now someone will be able to help you. Unfortunately I can't because I have very little experience in Java.



