Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Bored {
- public static void main(String [] shit) {
- int c = iny();
- int r = inx();
- int [][] k = new int[c][r];
- init("Would you like to insert any values? Y/N. ");
- String initIn = init();
- //System.out.print("\n Please insert the value on the first row, first collumn.");
- //Scanner in = new Scanner(System.in);
- }
- private static int iny() {
- System.out.print("Type in the number of collumns. ");
- Scanner s = new Scanner(System.in);
- int i = s.nextInt();
- return i;
- }
- private static int inx() {
- System.out.print("Type in the number of rows. ");
- Scanner s = new Scanner(System.in);
- int i = s.nextInt();
- return i;
- }
- private static String init(String initS) {
- System.out.print(initS);
- Scanner init = new Scanner(System.in);
- String initV = init.next();
- return initv;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement