: I get the result but apparently i don't respect a requirement => "The program should have two int variables a and b."
package fr.codegym.task.task02.task0207;
/*
Part of a calculator
*/
public class Solution {
public static void main(String[] args) {
int a = 3,b = 7;
sum(3,7);
product(3,7);
}
public static void sum (int a, int b) {
int c = a + b;
System.out.println(c);
}
public static void product (int a, int b) {
int d = a * b;
System.out.println(d);
}
//écris ton code ici
}
Part of a calculator
Under discussion
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Joseph
24 November 2019, 07:35
In main, it may want you to declare and initialize a and b on separate lines
0
pierre
24 November 2019, 10:21
got it. In fact it was much simpler... No need to create a sum or product method.
Thanks
0