+ 1
What am I doing wrong? Can anyone explain? What am I missing?
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); //get salaries int salary1 = 1500; scanner.nextInt(); int salary2 = 3200; scanner.nextInt(); //your code goes here int sum = salary1 + salary2; System.out.println (sum); } }
2 Antworten
+ 3
Remove those values (1500 and 3200) from salary1 and salary2.
Your program is already taking the input so you dont have to manually declare the values on your code.
https://code.sololearn.com/cXL7XMcGjX0a/?ref=app
+ 1
thank you :)
Actualy I understood my mistake before i saw your comment. 😊