Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class EmployeeData {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- String name = scanner.nextLine();
- int age = Integer.parseInt(scanner.nextLine());
- int ID = Integer.parseInt(scanner.nextLine());
- double salary = Double.parseDouble(scanner.nextLine());
- System.out.printf("Name: %s%n", name);
- System.out.printf("Age: %d%n", age);
- System.out.printf("Employee ID: %08d%n", ID);
- System.out.printf("Salary: %.2f", salary);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement