Assignemnt #23 and MoreUserInputOfData
Code
/// name: Leila Ordukhani
/// period: 6
/// program name: Twentieth Program
/// file name: MoreUserInputOfData.java
/// date finished: 10/1/15
import java.util.Scanner;
public class MoreUserInputOfData
{
public static void main( String[] args )
{
String fName, lName, login;
int grade, id;
double gpa;
Scanner keyboard = new Scanner(System.in);
System.out.println("Please enter the following information so I can sell it for profit!");
System.out.println();
System.out.print( "First Name: ");
fName = keyboard.next();
System.out.print( "Last Name: ");
lName = keyboard.next();
System.out.print( "Grade (9-12): ");
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.println( " Your Infromation: ");
System.out.println( " Login: " + login);
System.out.println( " ID: " + id);
System.out.println( " Name: " + lName + ", " + fName);
System.out.println( " GPA: " + gpa);
System.out.println( " Grade: " + grade);
}
}
Picture of the output