79482799

Date: 2025-03-04 06:23:35
Score: 1
Natty:
Report link

public static void main(String[] args) {

Scanner sc= new Scanner(System.in);
System.out.println("enter no of digits");
int n=sc.nextInt();

int var[]=new int[n];

for(int i=0;i<n;i++){
    
var[i]=sc.nextInt();
}
System.out.println("Printing Array elements using loop: ");
    for (int i = 0; i < n; i++)  
    {
        System.out.println(var[i]);
    }
}
}
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: C0DiFire