Skip to content

Instantly share code, notes, and snippets.

@mr-karan
Last active October 9, 2015 13:25
Show Gist options
  • Save mr-karan/f482d5f2e373ffe47bcc to your computer and use it in GitHub Desktop.
Save mr-karan/f482d5f2e373ffe47bcc to your computer and use it in GitHub Desktop.
subarrays in java
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class subarray {
public static void main(String[] args) {
Scanner reader=new Scanner(System.in);
for (int i=0;i<=5;i++){
for (int j=1;j<=5;j++) {
System.out.println("a["+i+":"+j+"]");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment