Advertisement
veronikaaa86

Employee Data

Jan 22nd, 2018
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class EmployeeData {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         String name = scanner.nextLine();
  8.         int age = Integer.parseInt(scanner.nextLine());
  9.         int ID = Integer.parseInt(scanner.nextLine());
  10.         double salary = Double.parseDouble(scanner.nextLine());
  11.  
  12.         System.out.printf("Name: %s%n", name);
  13.         System.out.printf("Age: %d%n", age);
  14.         System.out.printf("Employee ID: %08d%n", ID);
  15.         System.out.printf("Salary: %.2f", salary);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement