Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.94 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Bored {
  4.  
  5.      public static void main(String [] shit) {
  6.      
  7.      int c = iny();
  8.      int r = inx();
  9.      int [][] k = new int[c][r];
  10.      
  11.    
  12.     init("Would you like to insert any values? Y/N. ");
  13.    
  14.     String initIn = init();
  15.    
  16.      //System.out.print("\n Please insert the value on the first row, first collumn.");
  17.      //Scanner in = new Scanner(System.in);
  18.      
  19.      
  20.      
  21.        
  22.      
  23.      
  24.      }
  25.      
  26.      private static int iny() {
  27.      
  28.      System.out.print("Type in the number of collumns. ");
  29.      Scanner s = new Scanner(System.in);
  30.      int i = s.nextInt();
  31.      
  32.      return i;
  33.      }
  34.      
  35.      private static int inx() {
  36.      
  37.      System.out.print("Type in the number of rows. ");
  38.      Scanner s = new Scanner(System.in);
  39.      int i = s.nextInt();
  40.      
  41.      return i;
  42.      }
  43.      private static String init(String initS) {
  44.      
  45.      System.out.print(initS);
  46.      Scanner init = new Scanner(System.in);
  47.      String initV = init.next();
  48.      
  49.      return initv;
  50.      }
  51.  
  52.    
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement