Tech Study

Write a Java program to print multiplication table of given number using loop

Introduction

In this demo I have used NetBeans IDE 8.2 for debugging purpose. But you can use any java programming language compiler as per your availability..

import java.util.Scanner;
 
public class JavaLoopExcercise
{
    public static void main(String[] args)
    {
        Scanner console = new Scanner(System.in);
        int num;
 
        System.out.print("Enter any number: ");
        num = console.nextInt();
 
        System.out.println("Multiplication Table of " + num);
 
        for(int i=1; i<=10; i++)
        {
            System.out.println(num +" x " + i + " = " + (num*i) );
        }
}
 

Result

Write a Java program to print multiplication table of given number using loop
Write a Java program to print multiplication table of given number using loop

TaggedWrite a Java program to print multiplication table of given number using loop

Python Examples

Introduction: Python Examples are the basic programming concepts of python like python syntax,python data types,,python operators,python if else,python comments etc.. …

Read more

C String Functions

C String Functions perform certain operations, It provides many useful string functions which can come into action. The <string.h> header …

Read more