Skip to content

Commit e9d3256

Browse files
authored
Update Implementation_of_SJF.java
1 parent c7454f7 commit e9d3256

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Implementation_of_SJF.java

+10
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,13 @@ public static void main(String args[]){
4848
total++;
4949
}
5050
}
51+
52+
System.out.println("\nProcessID Arrival Brust Waiting");
53+
for(int i = 0; i < n; i++){
54+
avg_wait += wait[i];
55+
System.out.println(process_id[i] + "\t" + arrival[i] + "\t" + burst_time[i] + "\t" + wait[i]);
56+
}
57+
System.out.println ("average waiting time is " + (float)(avg_wait/n));
58+
sc.close();
59+
}
60+
}

0 commit comments

Comments
 (0)