Computer Science, asked by shilavatdamini, 10 days ago

generate multiplication table up to for numbers 1 to 5 program​

Answers

Answered by purveshKolhe
2

Answer:

public class Brainly {

public static void main(String [] args) {

for (int i = 1; i<11;i++)

for (int n = 2; n<21; n +=2)

for (int m = 3; m < 31; n +=3)

for (int l = 4; l < 41; l += 4)

for (int b=5;b<51; b += 5)

System.out.println(i \n n \n m\n l \n b);

}

}

Answered by BrainlyProgrammer
4

Best Answer(Easiest):-

class number{

public static void main (String ar []){

for(int I=1;I<=5;I++){

System.out.printlm("\nMultiplication table of "+I);

for(int j=1;j<=10;j++)

System.out.println(I+"×"+j+"="+(I*j));

}

}

}

Logic:-

  • Run I loop from 1 to 5
  • Run j loop from 1 to 10
  • multiple I and j
  • print the product

Check attachment.

Attachments:
Similar questions