If someone could take a look at my Java code for Payroll Program, I need to declare Int as a double in order to produce the produce of number of employees in a department times the average salary for each employee. If someone could throw up pointers, tips, or any type of help I would greatly appreciate it. Thanks.
// Fig 2.2: Product.java
// Printing a line of text with multiple statements.
// Calculate the product of two integers.
import java.util.Scanner; // program uses Scanner
public class Product {
public static void main(String[] args) {
// create Scanner to obtain input from command window
System.out.print("Department Name [enter name]\n");
System.out.print("Number of Employee's[enter total]\n");
System.out.print("Employee Salary[enter salary]\n");
System.out.println("H.R. Department");
Scanner input = new Scanner(System.in);
int x; // enter number of employee's
double y; // enter employee salary
int result; // product of numbers
System.out.print("Enter number of Employee's: "); // prompt for input
x = input.nextInt(); // read first integer
System.out.print("Enter employee salary:($) "); // prompt for input
y = input.nextDouble(); // read second integer
result = (int) (x * y); // calculate product of numbers
System.out.printf("Product is %d\n", result);
} //end method main
} //end class Product