Program to Display Multiplication Table- loop
Code:
Code:
/* Program to Display Multiplication Table */
class MultiplicationTable{
public static void main(int num){
System.out.println("*****MULTIPLICATION TABLE*****");
for(int i=1;i<=num;i++){
for(int j=1;j<=num;j++){
System.out.print(" "+i*j+" ");
}
System.out.print("\n");
}
}
}
Comment below for your Query and Feedback... :)class MultiplicationTable{
public static void main(int num){
System.out.println("*****MULTIPLICATION TABLE*****");
for(int i=1;i<=num;i++){
for(int j=1;j<=num;j++){
System.out.print(" "+i*j+" ");
}
System.out.print("\n");
}
}
}
0 comments:
Confused? Feel free to ask
Post a Comment