Created
January 17, 2020 14:15
-
-
Save mamiwinsfall93/ed47433cd6e6e8076ae5423269273f76 to your computer and use it in GitHub Desktop.
Multiplication table
This file contains 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
/* | |
Multiplication table | |
Use a while loop to display a 10x10 multiplication table. | |
Separate the numbers using a space | |
*/ | |
import java.io.*; | |
public class Solution { | |
public static void main(String[] args) throws Exception { | |
int j = 1,i = 1; | |
while(j<11) | |
{ | |
while(i<11) | |
{ | |
System.out.print((i*j) + " "); | |
i++; } | |
j++; | |
i = 1; | |
System.out.println(""); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment