Showing posts with label table. Show all posts
Showing posts with label table. Show all posts

Sunday, June 21, 2020

Write a program to print the Table of a number?

28)       Write a program to print the Table of a number?

import java.util.*;
public class Table
{
     public static void main(String args[ ])
    {
        Scanner sc = new Scanner (System.in);
        System.out.println("Enter a number");
        int a = sc.nextInt();
        System.out.println("\nTABLE of "+a);
        for(int i =1;i<=10;i++)
        {
            System.out.println(a+"x"+i+" = "+a*i);
        }
    }
}

 jhvghvgk ;nkjn ,nkjhj