The comiler is showing an error for this code.
public class Solution {
public static void main(String[] args) {
table(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);//write your code here
}
public static int table(int...a){
System.out.println(a + " " + a*2 + " " + a*3 +" " + a*4 +" "+ a*5 + " "+ a*6 +" " + a*7 +" " +a*8 +" " + a*9 +" " + a*10);
}
}
package com.codegym.task.task03.task0314;
/*
Multiplication table
*/
public class Solution {
public static void main(String[] args) {
table(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);//write your code here
}
public static int table(int...a){
System.out.println(a + " " + a*2 + " " + a*3 +" " + a*4 +" "+ a*5 + " "+ a*6 +" " + a*7 +" " +a*8 +" " + a*9 +" " + a*10);
}
}