Ticker

6/recent/ticker-posts

Write a Java program that takes a number as input and prints its multiplication table upto 10.

Here we will write a Java programs to display Multiplication Table of number which is input by user.it is a basic program of java

import java.util.Scanner;
public class javaprogram {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("Input a number: ");
int num1 = in.nextInt();
for (int i=0; i< 10; i++){
System.out.println(num1 + " x " + (i+1) + " = " +
(num1 * (i+1)));
}
}
}
view raw 1a-java.java hosted with ❤ by GitHub

Post a Comment

0 Comments

Ad Code

Join our New Telegram Channel