Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 677efa7

Browse files
Code added for Module 7
1 parent d367ab7 commit 677efa7

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

‎Module 7/MultTable.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* To change this license header, choose License Headers in Project Properties.
3+
* To change this template file, choose Tools | Templates
4+
* and open the template in the editor.
5+
*/
6+
7+
/**
8+
*
9+
* @author chandrikadeb
10+
*/
11+
import java.util.Scanner;
12+
public class MultTable {
13+
public static void main(String args[])
14+
{
15+
int a, b, c, d;
16+
17+
System.out.println("Enter range of numbers 'a' and 'b' to print their multiplication tables");
18+
Scanner in = new Scanner(System.in);
19+
20+
a = in.nextInt();
21+
b = in.nextInt();
22+
23+
for (c = a; c <= b; c++) {
24+
System.out.println("Multiplication table of "+c);
25+
26+
for (d = 1; d <= 10; d++) {
27+
System.out.println(c+"*"+d+" = "+(c*d));
28+
}
29+
}
30+
}
31+
}
32+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /