Advertisement
Spocoman

01. Student Information

Oct 15th, 2024
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. class StudentInformation {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         String name = scanner.nextLine();
  7.         int age = Integer.parseInt(scanner.nextLine());
  8.         double grade = Double.parseDouble(scanner.nextLine());
  9.        
  10.         System.out.printf("Name: %s, Age: %d, Grade: %.2f\n", name, age, grade);
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement