Write a Java program to display the multiplication table of a given integer


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..


techstudy.org

Kindle Paperwhite High Resolution Display Tablet | Rs. 9999

  1. import java.util.Scanner;
  2. public class JavaExcercise {
  3.  
  4. public static void main(String[] args)
  5.  
  6. {
  7. int j,num;
  8. {
  9. System.out.print("Enter number of terms : ");
  10. Scanner in = new Scanner(System.in);
  11. num = in.nextInt();
  12.  
  13. System.out.println ("\n");
  14. for(j=0;j<=num;j++)
  15.  
  16. System.out.println(num+" X "+j+" = " +num*j);
  17. }
  18. }
  19. }

Result

java techstudy.org

     





Related Topics


Responses




Popular Posts

Facebook

Founded in 2016, Tech Study passionately delivers stylish and dynamic innovative information to programmer and technology lovers. http://www.techstudy.org/.