java program to print multiplication table of any number

Solutions on MaxInterview for java program to print multiplication table of any number by the best coders in the world

showing results for - "java program to print multiplication table of any number"
Joaquín
24 Sep 2016
1import java.util.Scanner;
2public class MultiplicationTablesInJava
3{
4   public static void main(String[] args)
5   {
6      System.out.println("Please enter an integer to print tables : ");
7      Scanner sc = new Scanner(System.in);
8      int number = sc.nextInt();
9      System.out.println("Multiplication table of " + number + " is : ");
10      for(int a = 1; a <= 10; a++)
11      {
12         System.out.println(number + " * " + a + " = " + number * a);
13      }
14      sc.close();
15   }
16}
Giovanni
20 Jan 2020
1public static String multiTable(int num) {
2        StringBuilder sb = new StringBuilder();
3
4        for (int i = 1; i <= 10; i++) {
5            int result = i * num;
6            sb.append(i + " * " + num + " = " + result + "\n");
7        }
8        return sb.toString().trim();
9    }
queries leading to this page
multiplication table of 10 javahow to make a multiplication table in javaprint table of 2 in javawrite a java program that print multiplication table of a number up to 20 java program array to print multiplication tablelong method multiplication table in javamultiplication table for number javahow to multiplication table javamultiplication table in javawrite a java program to display multiplication tablejava multiplication table user decides the numberprint multiplication table for any range in javawrite a java program to print the multiplication table of any given numberjava program to print multiplication table from 1 to 10java multiplication table programhow to print the whole multiplication table in javajava multiplication tablemultiplication table using javatable of 0 2c1 in javahow to make multiplication table in javamultiplication table in java using nested for loopmultiplication table 3x3 javamultiplication table of n in javamultiplication table for java from 1 to 10create a program using a for loop which will print out the 4 e2 80 99s times table through 10 java multiplication table for loophow to make table of multiplication table javawrite a java program that will print out the times tables for all numbers between 1 and 12 using nested for loops 1 to 10 multiplication table for javahow to print a table in javadisplay multiplication table in javamultiplication tables javawrite a java program that takes a number as input and prints its multiplication table upto 10 in javajava program to print multiplication table of multiple numbersnumber to multiplication table in javaprint 2 time 2 to 12 in javawrite a java program that takes a number as input and prints its multiplication table upto 10 java write a program that prints a multiplication table for numbers up to 12java program to print multiplication table from 1 to 5multiplication table print javajava program display multiplication tableprinting a multiplication table in javahow to print a 10x10 multiplication table in javamultiplication table in java using functionmultiplication table using input stream in javajava program to display multiplication tableprinting multiplication table in javawrite a java program to help children multiplication it should ask the user which number they are learning to multiply and then produce a set of 12 multiplesjava program to multiplication table from userprogram on multiplication of table 2 in javamultiplication table javajava program to print multiplication table of any numberprint table in javaprogram to generate multiplication table in javahow to print multiplication table in javamultiplication table in java using for loopprinitng tables in javamultiplication table application javahow to print 2 time 1 to 12 in javatimes table javajava multiplication table of 2 programjava code tablemultiplication table java programjava code for multiplication tablemultiplication table n 2an javacalculate multiplication table javajava program to find multiplication table of a given numjava program to write multiplication tablewrite a program in java to display the multiplication table of a given integer up to 10 java write a program that prints out the multiplication table from 1 to 9 like 3ajava program to print multiplication table of any number