Created
September 27, 2017 02:39
-
-
Save viveknarang/3ccfb7fd3c3b0ec8f04762c0fc83e741 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NestedLoops { | |
public static void main (String [] args) { | |
int numRows = 2; | |
int numCols = 3; | |
// Note: You'll need to declare more variables | |
/* Your solution goes here */ | |
for (int i = 1 ; i <= numRows; i++) { | |
for(int j = 1 ; j <= numCols; j++) { | |
System.out.print(i + "" +(char)(j + 64) + " "); | |
} | |
} | |
System.out.println(""); | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment