Assignemnt #23
Code
/// Name: Holden Ganch
/// Period: 7
/// Program Name: twenty third Program
/// File Name: UserInputData.java
/// Date Finished: 9/24/2015
import java.util.Scanner;
public class UserInputData
{
public static void main( String[] args )
{
String Firstname, Lastname, login;
int ID, grade;
double GPA;
Scanner keyboard = new Scanner(System.in);
System.out.print( "Please enter the following information so I can sell it for a profit! " );
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( "ID: " );
ID = 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.println( "Login: " + login + " " );
System.out.println( "ID: " + ID + " " );
System.out.println( "Name: " + Firstname + " " + Lastname + " " );
System.out.println( "GPA: " + GPA + " " );
System.out.println( "Grade: " + grade + " " );
}
}
Picture of the output