Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.util.Scanner;
- import java.lang.String;
- public class Hardware {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- String[][] hardware = new String[2][6];
- int sentinel;
- sentinel = 0;
- do
- {
- System.out.println ("Please enter the part: ");
- hardware[1][sentinel+1] = in.next();
- System.out.println ("Please enter the coresponding part number: ");
- hardware[0][sentinel+1] = in.next();
- sentinel = sentinel + 1;
- }
- while (sentinel < 5);
- System.out.println ("Part No. Item Name");
- System.out.println ("******** *********");
- sentinel = 0;
- do
- {
- System.out.println (hardware[0][sentinel+1] + " " + hardware[1][sentinel+1]);
- sentinel = sentinel + 1;
- }
- while (sentinel < 5);
- }
- }
Add Comment
Please, Sign In to add comment