You are viewing a single comment's thread. Return to all comments →
import java.util.*;
public class Solution1{
public static void main(String args[]){ Scanner scan=new Scanner(System.in); int size=scan.nextInt(); int a[]=new int[size]; for(int i=0;i<size;i++){ a[i]=scan.nextInt(); } for(int i=0;i<a.length;i++){ if(i==a.length-1){ System.out.print(a[i]+"."); } else{ System.out.print(a[i]+","); } } scan.close(); }
}
Java 1D Array
You are viewing a single comment's thread. Return to all comments →
import java.util.*;
public class Solution1{
}