Function to print the required values after performing shortest job first
void print ( int n ) { cout << " ProcessId ▁ " << " Arrival ▁ Time ▁ " << " Burst ▁ Time ▁ " << " Completion ▁ Time ▁ " << " Turn ▁ Around ▁ Time ▁ " << " Waiting ▁ Time STRNEWLINE " ; for ( int i = 1 ; i <= n ; i ++ ) { cout << ar [ i ] . id << " ▁ TABSYMBOL TABSYMBOL ▁ " << ar [ i ] . at << " ▁ TABSYMBOL TABSYMBOL ▁ " << ar [ i ] . bt << " ▁ TABSYMBOL TABSYMBOL ▁ " << ar [ i ] . ct << " ▁ TABSYMBOL TABSYMBOL ▁ " << ar [ i ] . tat << " ▁ TABSYMBOL TABSYMBOL ▁ " << ar [ i ] . wt << " ▁ STRNEWLINE " ; } }