Assignemnt #23
Code
/// Name: Connor Siri
/// Period: 7
/// Program Name: User
/// File Name: User.java
/// Date Finished: 9/23/2015
import java.util.Scanner;
class User{
public static void main(String[] args) {
String Fname, Lname, login;
int grade, Sid;
double gpa;
Scanner keyboard = new Scanner(System.in);
System.out.print( "First name: " );
Fname = keyboard.next();
System.out.print( "Last name: ");
Lname = keyboard.next();
System.out.print( "Grade (9-12): " );
grade = keyboard.nextInt();
System.out.print("Student ID: ");
Sid = keyboard.nextInt();
System.out.print("Login: ");
login = keyboard.next();
System.out.print("GPA (0.0-4.0): ");
gpa = keyboard.nextDouble();
System.out.println("Your Information:");
System.out.print(" Login: " + login );
System.out.print(" ID: " + Sid);
System.out.print(" Name: " + Lname + ", " + Fname);
System.out.print(" GPA: " + gpa);
System.out.print(" Grade: " + grade);
}
}
Picture of the output