public class calculator{ public void add(int x,int y){ int sum =x+y; System.out.println(sum); } public void | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

public class calculator{ public void add(int x,int y){ int sum =x+y; System.out.println(sum); } public void

Now missing array what should i do guys

26th Jul 2021, 4:51 PM
Bura Thegreatho
6 Answers
+ 2
You can link your code like this: https://code.sololearn.com/c3tcrja9eMZf/?ref=app You missspelled the class name (capital C) and I think a closing } was missing
26th Jul 2021, 5:34 PM
Lisa
Lisa - avatar
+ 1
Hi, please put your code in playground and link it here. Also please tag the relevant programming language.
26th Jul 2021, 5:01 PM
Lisa
Lisa - avatar
0
You should put you code not in the title
26th Jul 2021, 5:00 PM
Angelo
Angelo - avatar
0
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); }
26th Jul 2021, 5:09 PM
Bura Thegreatho
0
Java
26th Jul 2021, 5:10 PM
Bura Thegreatho
0
It works guys thanks
26th Jul 2021, 5:54 PM
Bura Thegreatho