priority

mail@pastecode.io avatar
unknown
java
a year ago
693 B
5
Indexable
Never
import java.util.Scanner;
public class priority {
	
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		
		System.out.println("Enter the Number of Processes ");
		int processNo = scan.nextInt();
		
		System.out.println("Enter the burst time followed by the arrival followed by the priority");
		int bTime[] = new int[processNo];
		int pTime[] = new int[processNo];
		int aTime[] = new int[processNo];
		int pID[] = new int[processNo];

		for(int i = 0; i < processNo; i++) {
			System.out.println("Process " + (i+1));
			bTime[i] = scan.nextInt();
			aTime[i] = scan.nextInt();
			pTime[i] = scan.nextInt();
			pID[i] = i+1;
		}
	}

}