Assignment 23, More User Input
Code
///Name: Stella Koliavas
///Period: 5
///Program Name: More User Input
///File Name: MoreUserInput.java
///Date Finshed: 10/1/15
import java.util.Scanner;
public class MoreUserInput
{
public static void main(String [] args)
{
String First, Last, Login;
int Grade, ID;
double GPA;
Scanner siri= new Scanner(System.in);
System.out.print("First Name: " );
First= siri.next();
System.out.print("Last Name: " );
Last= siri.next();
System.out.print("Grade: " );
Grade= siri.nextInt();
System.out.print("Student ID: " );
ID= siri.nextInt();
System.out.print("Login: " );
Login= siri.next();
System.out.println("GPA: ");
GPA= siri.nextDouble();
System.out.println("Your info: ");
System.out.println("Login: " + Login);
System.out.println("ID: " + ID);
System.out.println("Name: " + Last+ ", " + First );
System.out.println("GPA: " + GPA);
System.out.println("Grade: " + Grade);
}
}
Picture of the output