Computer Science, asked by santoshmanepalli409, 9 days ago

Write an algorithm to find the list of which
student IDs should be in the first group,
followed by the student IDs which should be in
the second group as per the teacher's
instructions.
Input
The first line of the input consists of an integer
- num Students, representing the number of
students participating in the quiz(N).
The next lines consist okN spate-separated
integers - studID. studID 2,...studiDN.
representing student IDs for all the
participants
Output
Print N space-separated integers representing
the student IDs of first group followed by the
student IDs of the second group.​

Answers

Answered by pprajakta917
0

Explanation:

for practice i want to do practice for my coding purpose

Answered by shilpa85475
0

The first line of the input consists of an integer - num Students, representing the number of students participating in the quiz(N).

The next lines consist of N spate-separated IDs.

Explanation:

import java.util.Scanner;

public class abc

{

public static void main(String[] args)

{

Scanner scan = new Scanner(System.in);

 System.out.println("Please enter a student ID between 6-10 digits");

 String nums = scan.nextLine();  

 String[] studentIdArray = nums.split(" ");

 int[] studentID = new int [studentIdArray.length];

for (int i = 0; i < studentIdArray.length; i++)  

 {  

    studentID[i]= Integer.parseInt(studentIdArray[i]);

    System.out.print(studentID[i] + ",");

 }

}

Similar questions