Sunday, 31 August 2014

Java Table Writing

Structure of the Problem Requirements 

In this problem we will learn how to write a table in Java Program . In this program the program asked user to enter a number and then program display it table . For loop is used for this and after this the simple structure of the table is followed . Before this we also upload the same problem in C++ program and now again discus it in Java.

Source Code 

import java.util.Scanner;
public class Table_writing{
public static void main(String[] args) {
    Scanner input = new Scanner (;
    int num;
    System.out.print( " Enter Number to Write its Table : ");
    num = input.nextInt();
    for (int i =1;i<11;i++)
    System.out.println(num + " * " + i + " = " +num*i);
}   }

Output of the Program

Java Table Writing
Table Writing in Java Programming

Share it Please

About Author!

Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.


Post a Comment