
I have a quastion a bout array whic is>>> 1-write aprogram to diplay a multiplication table for 1to 10 by entering the start number and the end number.
EXAMPLE: ENTER START NUMBER:1 ENTER END NUMBER:3
the result will be
1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30

import java.util.*;
public class MultiplicationTable{
public static void main(String args[]){
Scanner input=new Scanner(System.in);
System.out.print("Enter start number: ");
int num1=input.nextInt();
System.out.print("Enter end number: ");
int num2=input.nextInt();
System.out.println();
int result;
for(int i=num1;i<=num2;i++){
for(int a = 1; a <= 10; a++)
{
result = i * a;
System.out.print(result+" ");
}
System.out.println();
}
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.