Skip to content

Instantly share code, notes, and snippets.

@mamiwinsfall93
Created January 17, 2020 14:15
Show Gist options
  • Save mamiwinsfall93/ed47433cd6e6e8076ae5423269273f76 to your computer and use it in GitHub Desktop.
Save mamiwinsfall93/ed47433cd6e6e8076ae5423269273f76 to your computer and use it in GitHub Desktop.
Multiplication table
/*
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