diff --git a/Codes/Group B/Assignment - 5/SJF (Premptive).cpp b/Codes/Group B/Assignment - 5/SJF (Premptive).cpp index 42ce415..3ca3e9f 100644 --- a/Codes/Group B/Assignment - 5/SJF (Premptive).cpp +++ b/Codes/Group B/Assignment - 5/SJF (Premptive).cpp @@ -2,7 +2,7 @@ using namespace std; struct sjf{ - int burst, arrival, id; + int burst, arrival, id, completion; bool active; }; sjf meh[30]; @@ -48,6 +48,7 @@ public: meh[iddd].burst--; k++; if(meh[iddd].burst == 0){ + meh[iddd].completion = k; completed++; } } else{ @@ -55,11 +56,20 @@ public: } } } + + void completion() + { + cout<<"\n\n | Completion time\n"; + for(int j = 0; j < n; j++) { + cout<<"P"<