Live Webinar: Prompt Engineering: Skill Everyone Must Learn Today
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Calculate Multiplication Table using Java
WhatsApp
Senthilvelan Sambamoorthy
Aug 13
2016
750
0
1
ssvmulti.rar
// Multiplication Table
import
java.io.*;
class
ssvmulti
{
public
static
void
main(String args[])
throws
IOException
{
System.out.print(
"\n\tEnter number :"
);
BufferedReader ip =
new
BufferedReader(
new
InputStreamReader(System.in));
int
num= Integer.parseInt(ip.readLine());
System.out.println(
"\n\n\n\t\tMULTIPLICATION TABLE OF 5"
);
System.out.print(
"\n\n\n"
);
for
(
int
i =
1
;i<=
20
;i++)
{
int
sum = i * num;
if
(i<
10
)
System.out.println(
"\t\t\t "
+ i +
" * "
+ num +
" = "
+ sum);
else
System.out.println(
"\t\t\t"
+ i +
" * "
+ num +
" = "
+ sum);
}
// end of for
}
// end of main
}
// end of class
Java
Up Next
Calculate Multiplication Table using Java