Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
5 views

Java

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Java

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

package jericho;

import java.util.Scanner;

public class jericho111 {

public static void main(String[] args) {

Scanner scanner = new Scanner(System.in);

final double DAILY_RATE = 500.0;

System.out.print("Enter Employee ID: ");

int employeeId = scanner.nextInt();

scanner.nextLine(); // Consume newline

System.out.print("Enter Name: ");

String name = scanner.nextLine();

System.out.print("Enter Days of Work: ");

int daysOfWork = scanner.nextInt();

scanner.nextLine();

System.out.print("Enter Department: ");

String department = scanner.nextLine();

double salary = daysOfWork * DAILY_RATE;


System.out.println("\nEmployee Details:");

System.out.println("ID: " + employeeId);

System.out.println("Name: " + name);

System.out.println("Department: " + department);

System.out.println("Salary: " + salary);

scanner.close();

You might also like