fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. int [] a = new int[] {1,2,3,4,5};// your code goes here
  13. int [] b = new int[] {2,3,4,5,6};
  14. int [] c = new int[5];
  15. for (int i=0; i < a.length; i++) {
  16. c[i] = a[i] * b[i];
  17. System.out.println ("c["+i+"]=" + (a[i]*b[i]));
  18. }
  19.  
  20.  
  21. // your code goes here
  22. }
  23. }
Success #stdin #stdout 0.09s 27824KB
stdin
Standard input is empty
stdout
c[0]=2
c[1]=6
c[2]=12
c[3]=20
c[4]=30