Assignemnt #23 and More Input
Code
/// Name: Kyle Ivy
/// Period: 5
/// Program Name: MoreInput
/// File Name: MoreInput.java
/// Date Finished: 10/1/2015
import java.util.Scanner;
public class MoreInput {
public static void main( String[] args ) {
Scanner keyboard = new Scanner(System.in);
String firstName , lastName , login;
int grade;
double GPA , idNumber;
System.out.println( "Please enter the following information so I can sell it for a profit!" );
System.out.println();
System.out.print( "First name: " );
firstName = keyboard.next();
System.out.print( "Last Name: " );
lastName = keyboard.next();
System.out.print( "Grade (9-12): " );
grade = keyboard.nextInt();
System.out.print( "Student ID: " );
idNumber = keyboard.nextDouble();
System.out.print( "Login: " );
login = keyboard.next();
System.out.print( "GPA: " );
GPA = keyboard.nextDouble();
System.out.println();
System.out.println( "Your information:" );
System.out.println( " Login: " + login );
System.out.println( " ID: " + idNumber );
System.out.println( " Name: " + lastName + ", " + firstName );
System.out.println( " GPA: " + GPA );
System.out.println( " Grade: " + grade );
}
}
prog23.PNG