Assignemnt #23 and More User Input of Data
Code
///Name: Ben Borglin
///Period: 6
///Program Name: More User Input of Data
///File Name: MoreUserInputofData.java
///Date Finished: 9/21/15
import java.util.Scanner;
public class MoreUserInputofData
{
public static void main( String[] args )
{
String login, name, lastname;
int grade, id;
Double GPA;
Scanner keyboard = new Scanner(System.in);
System.out.print("First name: ");
name= keyboard.next();
System.out.print("Last Name: ");
lastname= keyboard.next();
System.out.print("Grade: ");
grade= keyboard.nextInt();
System.out.print("Student ID: ");
id= keyboard.nextInt();
System.out.print("Login: ");
login= keyboard.next();
System.out.print("GPA (0.0-4.0): ");
GPA= keyboard.nextDouble();
System.out.print("Your Information:");
System.out.println(" Login: " + login + "");
System.out.println(" ID: " + id + "");
System.out.println(" Name: " + name + "");
System.out.println(" GPA: " + lastname + "" + name + "");
System.out.println(" Grade: " + grade + "");
}
}
Picture of the output