Question: public class Javaprogram38 { public static void main(String[] args) { Scanner kb = new Scanner(System.in); int n; System.out.println(Enter number of elements in a list: );
public class Javaprogram38 { public static void main(String[] args) { Scanner kb = new Scanner(System.in); int n; System.out.println("Enter number of elements in a list: "); n = kb.nextInt(); int[] a = new int[n]; for(int i=0;i } program this code using while loop and do while and for loop each section(1,2,3,4) should be a seperate code(not one code) and the loops should be sperate code too
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
