@paulbui/

SimpleProgramWithoutOOP

Java

No description

fork
loading
Files
  • Main.java
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    
		Scanner scan = new Scanner(System.in);

		String p1FirstName = "";
		String p1LastName = "";
		int p1Grade = 0;

		String p2FirstName = "";
		String p2LastName = "";
		int p2Grade = 0;
		
		String p3FirstName = "";
		String p3LastName = "";
		int p3Grade = 0;
		
		System.out.print("First Name: ");
		p1FirstName = scan.next();
		System.out.print("Last Name: ");
		p1LastName = scan.next();
		System.out.print("Grade: ");
		p1Grade = scan.nextInt();

		System.out.print("First Name: ");
		p2FirstName = scan.next();
		System.out.print("Last Name: ");
		p2LastName = scan.next();
		System.out.print("Grade: ");
		p2Grade = scan.nextInt();

		System.out.print("First Name: ");
		p3FirstName = scan.next();
		System.out.print("Last Name: ");
		p3LastName = scan.next();
		System.out.print("Grade: ");
		p3Grade = scan.nextInt();

		System.out.println(p1FirstName + " " + p1LastName + " - " + p1Grade);
		System.out.println(p2FirstName + " " + p2LastName + " - " + p2Grade);
		System.out.println(p3FirstName + " " + p3LastName + " - " + p3Grade);
  }
}