Assignemnt #23 and More User Inputs
Code
///Name: Dakota Donahue
///Period: 5
///Project Name: MoreUserInputs
///File Name: MoreUserInputs
///Date: 9/21/2015
import java.util.Scanner;
public class MoreUserInputs
{
public static void main( String[] args)
{
String fname, lname, log;
int gd, id;
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): ");
gd= keyboard.nextInt();
System.out.print("Student ID: ");
id= keyboard.nextInt();
System.out.print("Login: ");
log= keyboard.next();
System.out.print("GPA: ");
gpa= keyboard.nextDouble();
System.out.println("Your Information:");
System.out.println("First Name: " + fname + " ");
System.out.println("Last Name: " + lname + " ");
System.out.println("Grade (9-12): " + gd + " ");
System.out.println("Student ID: " + id + " ");
System.out.println("Login: " + log + " ");
System.out.println("GPA: " + gpa + " ");
}
}
Picture of the output