+ 1

Can anyone help me with this solving this code in Java?

You have two employees in your organization. Write a program to take their salaries as input and print them both out. Sample Input 1500 3200 Sample output 4700 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); //get salaries int salary1 = scanner.nextInt(); int salary2 = scanner.nextInt(); //your code goes here } }

30th Dec 2021, 1:55 AM
Berkem Kudun
Berkem Kudun - avatar
2 Answers
+ 1
correct answer is; System.out.print(salary1 + salary2); no need to description
30th Dec 2021, 3:49 PM
Berkem Kudun
Berkem Kudun - avatar
+ 3
You just have to add this System.out.println("The salary of first employee is = "+salary1); System.out.println("The salary of second employee is = "+salary2); But you should show your attempt
30th Dec 2021, 2:14 AM
Ananya | Inactive |
Ananya | Inactive | - avatar