# Help making the calculator?

I am having several errors with my calculator, and I can’t figure out how to fix them. Apparently the errors are on line 32 and 46, 32 being the start of the modulo method and 46 being when I create my main method. My code is below, any help would be greatly appreciated.

``````public class Calculator {
public Calculator() {

}

public int add(int a, int b) {

return a+b;

}

public int subtract(int a, int b) {

return c - d;
}
public int multiply(int a, int b) {

return e * f;

}
public int divide(int a, int b) {

if (b==0)
{
System.out.println("Error! Diving by zero is not allowed!");
return 0;

}
else {
return a / b;
}
public int modulo(int a, int b) {
if (b==0)  {

System.out.println("Error! Diving by zero is not allowed!");
return 0;

}
else {
return a % b;

}
public static void main(String[] args) {
Calculator myCalculator= new Calculator();
System.out.println(myCalculator.subtract(45,11));

}

}

}
``````

All of your parameters are a and b, but only one method uses them correctly. Use `a` and `b` consistently in all the methods so they matchthe parameters.

Also this may be of some importance…

https://stackoverflow.com/questions/3346764/should-java-methods-be-static-by-default

Your modulo problem is that the tutorial for Calculators doesnt remind you of not writing `a modulo b`

but `a % b`

had the same problem and just came to this myself. it seems that you dont get help here in the forums when i see that you asked that 11 months ago and still did get no answer.