Advertisement
CR7CR7

01.Age

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