+ 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 } }
2 Respuestas
+ 1
correct answer is;
System.out.print(salary1 + salary2);
no need to description
+ 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