home
Guest Signup/Login to unlock all features

Menu

Views: 784

Replies: 2

Share this post
facebook twitter gplus

avatar

Member

rusell

Program To Show Multiplication Table Of A Number

Feb 18 2017 at 03:21am

// Java program to display the
Multiplication Table of a number.
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
int n;
int c;
System.out.println("Enter Number To
Show It Multiplication Table ");
Scanner i = new Scanner(System.in);
n = i.nextInt();
System.out.println(" Multiplication
Table of " + n);
for (c=1; c<=20; c++) {
System.out.println(n + "*" + c + " = "
+ n*c);
}
System.out.println("Enter 1 to
continue");
Scanner in = new Scanner(System.in);
int g = i.nextInt();
if (g == 1) {
String[] s = null;
main(s);
}
}
}



avatar

ADMIN

eaweb

Re: Program To Show Multiplication Table Of A Number

Feb 18 2017 at 06:17am

Nice one.


quote ()
avatar

Member

rusell

Re: Program To Show Multiplication Table Of A Number

Feb 18 2017 at 08:46am

yeah boss


quote ()

Quick reply


+ files BBCode

Sponsored